재접속시 연결 실패
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: 재접속시 연결 실패
by Edward ·
안녕하세요.
위 문제는 서버 문제로 보입니다.
서버를 저희 칩을 사용하여 구현하신건가요?? 아니면 모듈을 사용해서 구현하신건가요??
그리고 칩 네임드를 알려주셔야 좀 더 정확한 답변이 가능합니다.
우선 서버를 저희 칩&모듈을 사용하여 구현했다고 판단하고 설명을 드리겠습니다.
웹서버 구현 시 최초 연결접속은 클라이언트로 부터 connect를 받아들여 연결이 이루어지지만, 이 후 클라이언트와의 연결이 끊겨도 서버는 연결이 끊긴지 모르는 상태로 보입니다.
그래서 서버의 코드 부분에 연결이 끊기면 다시 초기 연결을 받아들일 수 있는 상태로 변경되어야 합니다.
코드는 저희 iolibrary의 loopback 함수를 참조하시면 됩니다.
github.com/Wiznet/ioLibrary_Driver
위 경로로 접속하셔서 loopback 코드를 살펴보시면 됩니다.
여기서 loopback_tcps() 함수에서
case SOCK_CLOSE_WAIT :
#ifdef LOOPBACK_DEBUG
//printf(“%d:CloseWait\r\n”,sn);
#endif
if((ret = disconnect(sn)) != SOCK_OK) return ret;
#ifdef LOOPBACK_DEBUG
printf(“%d:Socket Closed\r\n”, sn);
#endif
break;
위 disconect를 참고해주시면 될 것 같습니다.
감사합니다.