GabiMe
GabiMe

Reputation: 18473

Erlang - is it OK to send(..) simultaneously on tcp socket from different processes?

I need to send stuff on a tcp socket from different processes. Is it allowed to send simultaneously on same socket? If not, how sychonization can be achieved?

Upvotes: 3

Views: 163

Answers (1)

Adam Lindberg
Adam Lindberg

Reputation: 16577

Yes, a socket behaves like a process, accepting messages from any other process. Just be aware, if the order of messages is important, that the order of messages sent cannot be guaranteed (only the order of messages per sending process).

Upvotes: 8

Related Questions