소켓 connect 관련 문의드립니다
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: 소켓 connect 관련 문의드립니다
by cc1915 ·
[quote=“midnightcow”]Client socket을 Open할 때 Port number는 랜덤으로 생성하셔야 합니다.
고정 값으로 설정할 경우, 서버측에서 이전 Socket과의 재 연결로 인식하여 연결이 제대로 되지 않을수 있습니다.
이부분 확인바랍니다.[/quote]
랜덤 포트가 이해가 안가네요… 서버측은 포트 5000번으로 고정되어있는데 클라이언트가 랜덤으로 포트를 설정한다면 연결이
안되지 않나요??
만약 답변내용처럼 구현한다면 비정상적인 클라이언트 종료시 서버측에서 세션을 delet할 수 있는 것이겠군요…
RE: 소켓 connect 관련 문의드립니다
by irinakim ·
Client socket의 port number를 랜덤을 해도 연결이 되는것은
TCP의 3way handshake와 연관됩니다.
3way handshake가 완료되었다면 연결되는데에는 문제가 없습니다.
그러므로 Client의 포트는 random port로 하는것이 맞습니다.