Вопрос

I want to use UDP to send PUSH notifications for users of our system , but i wonder if it will work ?

Assuming i have one server which have port let's say UDP:8888 open and waiting for connections . My questions are :

  • Is it possible for many users to connect to it ? (Like the HTTP 90 service ?)

  • If yes , after the clients connection , i will grab his UDP port number and IP address > can i establish a new connection from the server to the clients UDP port and send him some data ?

Thanks :)

Это было полезно?

Решение

  1. When you say Server at Port UDP:8888 it will be able to receive connection from multiple client

  2. Use SO_REUSEADDR to resuse same UDP port. Reusing a port number in a UDP

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top