开发者

c# socket: get server when client connects

开发者 https://www.devze.com 2023-03-05 07:33 出处:网络
i have a Server socket using an async functions to allow a client socket to connect. And when i call Socket.EndAccept()it returns a copy of the client Socket,

i have a Server socket using an async functions to allow a client socket to connect. And when i call Socket.EndAccept() it returns a copy of the client Socket,

i'd like some way for the client socket connecting to get a copy of the Server socket

is this possible?

EDIT: question was rather forumlated weird, sorry, found a solution to the problem though.

The problem was that when i tried to send reply开发者_StackOverflow back to the client i used the server socket instead of the socket returned from Socket.endAccept()

Thank you


ehh? You just used it when calling Socket.EndAccept()?

Socket is the server socket.

0

精彩评论

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