c - Better have one long or multiple short UDP sockets? -


i want send regularly udp messages through sockets.

is better use 1 socket, or recreate socket each message , close them after?

since udp stateless, change anything?

if you're expecting receive on socket, had better exist entire time on you're expecting receive.

if you're expecting send multiple messages without receiving replies have design mistake, there doesn't seem reason why keep opening , closing udp sockets purpose. surely makes more sense keep socket open long necessary?


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -