I am near. May be few hours or days. Right now it is getting a little harder to behave properly according to the society. I just don't talk much because I don't have much to say. I'm not able to engage with people. All I do is keep sitting in silence in bliss, sometimes solving mathematics or playing chess or listening music.
Putting aside the doubts whether you're close to Enlightenment or not... Or even if there is such thing as "Enlightenment"... And whether Enlightenment is something that can be attained by "me" at some point, and then retained for ever... And whether someone enlightened could still have questions about what to do and how to behave... In other words, assuming your question is valid,
When you get "enlightened" you lose your reference point. So it may be hard to decide what's good / what's bad anymore. "What do I want? What should I do? Should I do anything at all?" -- nothing seems right or wrong by itself, in some sense it's all invented by people. Nothing is important, nothing is serious, all this stuff that normal people engage seems pointless. Hence the question about "how to behave in society" - did I get this right? I hope so.
There are two parts to an answer my teacher gave me when I asked.
First, regarding your own purpose and meaning of life. From the perspective of the Absolute Truth, you are free. You can literally do anything. If you want to play games, you can play games. If you want to drink yourself to death, you can drink yourself to death. If you want to go to other worlds, you go to other worlds. If you want to teach, you can teach. If you want to do nothing, you can do nothing. There is no reason to sit and worry what's the "best" thing to do, because there is no "best" thing to do, they are all equally pointless in the big scheme of things. In fact, the best thing to do is probably to arbitrarily choose any idea X that you like, and be totally serious about it, as if it was indeed a serious thing you believed in.
However, from the perspective of life here on planet Earth, actions lead to results. What you do and say has effect. And all the people around you still feel pain, they still have their lives. If you stand up and walk out of class, this may look harmless to you, and the teacher's frustration may seem funny and unjustified (in the big scheme of things) - however, by doing that you're setting bad example to other students and you are making the teacher unhappy. So even though everything is free and empty, you just created a little island of chaos and suffering in your immediate locality. See what I mean? So the best way to function in society, is to always, always, always be mindful of the perspective of others. What will they feel? How will this affect them? Will this action lead to peace and harmony for others or will it lead to conflict and negative mindstates for them?
By combining these two principles -- the absolute and the local -- we arrive at the enlightened behavior: combination of spontaneous freedom with no reference point, and tremendous empathy/responsibility for everything you touch in your spontaneous dance.
"How to function properly in society after enlightenment" may be the same as before.
There's a quote from Zen buddhism (which is explained here) which says,
"Before Enlightenment chop wood, carry water. After enlightenment chop wood, carry water".
For the sake of completeness perhaps I should add that some people, enlightened or not, maybe don't "function in society" -- of these people, some are (and some aren't) more or less well supported by society .. even though they aren't functioning.
And/or maybe some people function in a different way ... less selfish, perhaps.
The (deleted) content of your post, about your being in class, implies that you are a young adult. Beware that's an age at which some people experience types or symptoms of mental illnesses, maybe for the first time. I'm not saying that's your experience, but that's maybe something to be aware of -- I say that because that's part of my experience (I don't know about your experience much).
But it seems to me that "enlightenment" shouldn't mean the same thing as "disability" -- a disability (being unable or unwilling to function) isn't necessarily a state of mind I'd want to develop.
Walking out of class is a bit questionable ... I mean, you're questioning it. You didn't give much reason for it, so it sounds like poor impulse control, possibly passive-aggressive, maybe attention-getting ... irrational.
Perhps you, somehow, enjoyed doing that, but I'm not sure it was the best (most enlightened) way to behave.
In case it matters and in case you didn't know, the traditional Buddhist "way" can be described as a Threefold Training, of which ethics (virtue) is maybe the first. I think that includes traditional virtues ... telling the truth, respecting the people who you ought to respect, being harmless at worst and generous at best (though within reason).
Also Buddhist society (societies) might traditionally be classified, as a "lay society" and a "monastic society", which are inter-dependent. Having a "good friend" (or "admirable" friend -- kalyāṇa-mitta) is important too, perhaps all-important.
There is a YouTube video where Ajahn Brahm, abbot of the Bodhinyana Monastery in Western Australia, talked about the time he thought he may have become enlightened. This was in Thailand, when he was still a junior monk.
In this story, he said that after a long period of meditation (some days), he woke up in a state of intense bliss. He thought he may have become enlightened.
Later, he went to get alms. There was food distributed to the monks, including one small pot of delicious food (I think it was pork curry), and another big pot of unappetizing food (I think it was stinky fermented fish stew). Pork curry was a rare special treat, while the stinky fish stew is something ordinary. Both were distributed to a group of monks.
The most senior monk gets to take his food first. He took only the delicious pork curry for himself, and then he poured the remaining contents of the small pot into the big pot and mixed them together, saying, "They are all the same. As monks, we must not be choosy."
Having not eaten for several days, Bhikkhu Brahm was hungry. Seeing the senior monk's actions, he became angry, but did not say anything to him.
Then he thought, "if I became angry, then I'm definitely not enlightened."
The moral of the story is that the fetters (samyojana) are very deep-rooted and deep-seated, that feelings of bliss may temporarily mask the fetters. They are most probably still there and one would not be enlightened yet. Blissful feelings and jhanas could be easily mistaken for enlightenment.
I think one common consequence of "walking the path" is that one needs less things from the outside world.
Since you said in your question that you don't talk much, I'll talk about talking.
A common behavior of humans is that they talk. They mostly talk gossip and chit chat. They do it because they need it. Without it, they would get agitated. That's why humans call themselves "social beings".
When one is enlightened, he or she still continues to talk, but stops to gossip and chit chat. Without it, he or she is not agitated, but calm. He or she stops because he or she does not need it anymore and also because other beings don't need it any more as they are already getting it (they get quite enough or even too much gossip and chit chat from others), thus he or she does not engage in gossip and chit chat as this would only make their realization of the truth more difficult.
When one is enlightened, even though he or she does not need gossip and chit chat and he/she stops gossiping and chit chatting, he or she, in rare cases if it is needed for the greater good of him or her or of the other being, can still decide to gossip and chit without any aversion towards it.
Maybe not now, but after enlightenment you will function properly in society. If you don't then maybe there is something other than enlightenment that you'll need to realize before enlightenment.
Emptiness is not enlightenment.
Did the Buddha become a dysfunctional wreck after getting Enlightened? What about the many other bodhisattvas that went beyond Concentration and Insight practices?
If you are becoming dysfunctional it is due to incorrect focus. However, it is normal to be non-functional during meditation. That is after all the nature of meditation: the journey to who you are is beyond all-that-is.
Hint: Meditation can induce some suffering. There are very specific indicators. I recommend reading the book "Mastering the Core Teachings of the Buddha" it is free.