-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
is NetPeer.Send thread safe? #109
Comments
Hi! No, |
cool thanks! |
I plane to move my server from lidgren3 to LiteNetLib. I have rooms realization and each room has own thread. If it is not thread-safe, then in what thread should I use to send messages? |
@pax83 i will make thread safe send fix soon. public void MyThreadSafeSend(byte[] data)
{
lock(this)
{
netPeer.Send(...)
}
} |
Fixed in next version branch (packetprocessor) |
@friuns2 merged into main branch. |
Are you saying that NetPacketProcessor is threadsafe, but the rest of the API is not? So I must use |
@pha3z this fixed in master branch for now. (merged from packetprocessor branch, not class) |
Hi, sorry resuming this post (blame google for it :D). is NetPeer.Send now thread safe? From what I can see from the code, it doesn't seem like |
hello is NetPeer.Send thread safe can i do like that?
The text was updated successfully, but these errors were encountered: