Hi,
Does anyone know why the client code return error 57:
'---------------------------------------
'No lan card is installed in the machine
'use 127.0.0.1 as host address (local host?)
'I have sucessfully ping this address
#COMPILE EXE
DEFLNG A-Z
FUNCTION PBMAIN()
hTcp = FREEFILE
TCP OPEN PORT 7 AT "127.0.0.1" AS hTcp
MSGBOX STR$(ERR)
TCP CLOSE hTcp
END FUNCTION
'--------------------------------------
and the server code work fine:
'---------------------------------------
'No lan card is installed in the machine
'so the current ip is 127.0.0.1
#COMPILE EXE
DEFLNG A-Z
FUNCTION PBMAIN()
HOST ADDR TO MyAddr
hTcp = FREEFILE
TCP OPEN SERVER ADDR MyAddr PORT 7 AS hTcp
MSGBOX STR$(ERR)
TCP CLOSE hTcp
END FUNCTION
'--------------------------------------
I use eclient.bas and echoserv.bas for testing and get
same result (server open ok and client open returns error 57)
Thanks.
Yang
------------------
Does anyone know why the client code return error 57:
'---------------------------------------
'No lan card is installed in the machine
'use 127.0.0.1 as host address (local host?)
'I have sucessfully ping this address
#COMPILE EXE
DEFLNG A-Z
FUNCTION PBMAIN()
hTcp = FREEFILE
TCP OPEN PORT 7 AT "127.0.0.1" AS hTcp
MSGBOX STR$(ERR)
TCP CLOSE hTcp
END FUNCTION
'--------------------------------------
and the server code work fine:
'---------------------------------------
'No lan card is installed in the machine
'so the current ip is 127.0.0.1
#COMPILE EXE
DEFLNG A-Z
FUNCTION PBMAIN()
HOST ADDR TO MyAddr
hTcp = FREEFILE
TCP OPEN SERVER ADDR MyAddr PORT 7 AS hTcp
MSGBOX STR$(ERR)
TCP CLOSE hTcp
END FUNCTION
'--------------------------------------
I use eclient.bas and echoserv.bas for testing and get
same result (server open ok and client open returns error 57)
Thanks.
Yang
------------------
Comment