I'm working with .Net I'm looking to create a service and looking between TCP or UDP. Service is supposed to support multiple clients so I'm making it async with .Net SocketAsyncEventArgs as I've seen to have better performance and less memory compsumption. I know TCP is slower that UPD but I would like to know your opinion of what would work faster between this two scenarios
1) Using TCP and the SocketAsyncEventArgs, every client will connect and once the Service Accepts the connection basically every client has an endpoint to start sending and receiving, so multiple messages can be sent while the connection is open ( accepted). Basically every client has it's own connection and can have two way communication
2) Every client will send a UDP datagram to the same UDP server Endpoint so basically I have one endpoint for all clients to send all the messages then process them and send a datagram back to each individually.
Maybe I have a miss conception of TCP/UPD but basically the question is once I have an open TCP connection per client, is it slower that sending back and forth UDP messages when all clients are sharing the same initial UDP endpoint.