C
C#6mo ago
LycRicks

I am writing udp server and I can send back the data from the clients, but I do not know how to send

can you help me
10 Replies
canton7
canton76mo ago
What's the problem with that code?
LycRicks
LycRicks6mo ago
I cannot send data to all clients It just sends the data back to the client from which it received it.
canton7
canton76mo ago
Yes, that's what it does If you want to send data to all clients, you need to keep track of all clients (which isn't easy with UDP, as there's no concept of a "connection", and so no way to tell when a client has disconnected), and then send the data to all of the clients, with multiple calls to Send
LycRicks
LycRicks6mo ago
can you show an example
canton7
canton76mo ago
No, but there will be plenty online as this is a common beginner task Search for "udp chat server" or similar
LycRicks
LycRicks6mo ago
I couldn't find it on stackowerflow hmm let me see
canton7
canton76mo ago
Yeah you don't tend to find tutorials on SO
LycRicks
LycRicks6mo ago
what does it mean so my English is bad
canton7
canton76mo ago
StackOverflow
LycRicks
LycRicks6mo ago
oww okeyy thx @canton7 I seriously couldn't find it My English is bad, I don't understand very well, I need help.