开发者

creating ports and initiating communication between client and server

开发者 https://www.devze.com 2023-01-08 21:56 出处:网络
what i need is a server that listens to 5060 port , when the client sends data to that port the server should open up another port ( any port after 1250 i believe ) and forward the clients data to tha

what i need is a server that listens to 5060 port , when the client sends data to that port the server should open up another port ( any port after 1250 i believe ) and forward the clients data to that port keeping 5060 idle so it can perform the same function for the next client

so basically i need the server to a) open up multiple ports one for each client b) get the voice data from the client and be able to send voice data to that client

i m looking into the hardware specs and other such details of the scenario so i dont have time to make such a program myself if theres a code that i can run directly ( both server and client side ) on visual studio .net 2010 that will perform these tasks then that would be extremely helpful

thanks al开发者_开发百科ot in advance


Sounds like a typical TCP socket server implementation. I don't know C# but I'm sure there's a mapping in there of the Berkeley Sockets / Winsock listen() and accept() functions, which do just what you're looking for at the raw sockets API level. I imagine you should be looking for a TCPServer or TCPSocket class (or similar) in the .Net library.


If both client and server are .NET I would look into using WCF for it.


You may need to go in for a concurrent TCP client server architecture. It is where there will be one listening socket that multiple connected socket endpoints for the clients at any time.

0

精彩评论

暂无评论...
验证码 换一张
取 消