C
C#12mo 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
canton712mo ago
What's the problem with that code?
LycRicks
LycRicksOP12mo ago
I cannot send data to all clients It just sends the data back to the client from which it received it.
canton7
canton712mo 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
LycRicksOP12mo ago
can you show an example
canton7
canton712mo ago
No, but there will be plenty online as this is a common beginner task Search for "udp chat server" or similar
LycRicks
LycRicksOP12mo ago
I couldn't find it on stackowerflow hmm let me see
canton7
canton712mo ago
Yeah you don't tend to find tutorials on SO
LycRicks
LycRicksOP12mo ago
what does it mean so my English is bad
canton7
canton712mo ago
StackOverflow
LycRicks
LycRicksOP12mo ago
oww okeyy thx @canton7 I seriously couldn't find it My English is bad, I don't understand very well, I need help.
Want results from more Discord servers?
Add your server