EuTCP4u Error
- Posted by Elliott Sales de Andrade <quantum_analyst at hotmail.com> Jan 23, 2002
- 416 views
This is a multi-part message in MIME format. ------=_NextPart_000_1155_36c2_4b8d Ray, There is a problem with euTCP4u. If you run the client program without the server, the send_seq demo without recv_seq or the IRC client and it won't connect then it you get a type check failure. It always returns the same number, 4294967295. I think that might be an error number meaning TCP can't connect or something but I didn't check. You have to change connect_socket to an atom instead of an integer because that number is too big for an integer. I included all three error messages, but I think I explained what happened anyway. Also, send_seq does not work when it connects. I don't know what the problem is because of the 300 line limit. You can check it out if you want. ------=_NextPart_000_1155_36c2_4b8d Content-Type: text/plain; name="ircclient_ex.err"; format=flowed Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="ircclient_ex.err" D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:505 in function tcp4u_connect() type_check failure, connect_socket is 4294967295 server = {49'1',50'2',55'7',46'.',48'0',46'.',48'0',46'.',49'1'} service = 0 port = 6667 ret = -6 connect_socket = 4294967295 socket_addr = 3538992 port_addr = 3543024 service_addr = <no value> server_addr = 3612528 ... called from D:\Euphoria\Stuff\IO\TCP4U\irc_test.exw:91 Global & Local Variables D:\EUPHORIA\include\machine.e: check_calls = 1 D:\EUPHORIA\include\get.e: input_file = <no value> input_string = <no value> string_next = <no value> ch = <no value> D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew: TCP4U_MAX_MSG_SIZE = 16384 TCP4U_STOP_STRING = {69'E',117'u',84'T',99'c',80'P',115's',84'T',111'o', 80'P'} myTcp4uLib = 268435456 myTcp4uInit = 0 myTcp4uCleanup = 1 myTcp4uVer = 2 myTcp4uEr = <no value> myTcp4uErrorString = 3 myTcpGetLocalID = 4 myTcpAccept = 5 myTcpConnect = 6 myTcpClose = 7 myTcpFlush = 8 myTcpGetListenSocket = 9 myTcpSend = 10 myTcpRecv = 11 myTcpRecvUntilStr = 12 myHttpIsValidURL = 18 myHttp4uSetBufferSize = 15 myHttp4uSetTimeout = 16 myHttp4uErrorString = 17 myHttpGetFile = 19 myHttpGetFileEx = 20 myTcpIsDataAvail = 13 myTcpGetRemoteID = 14 D:\Euphoria\Stuff\IO\TCP4U\irc_test.exw: server_name = {49'1',50'2',55'7',46'.',48'0',46'.',48'0',46'.',49'1'} port = 6667 password = {112'p',97'a',115's',115's',119'w',111'o',114'r',100'd'} nick = {109'm',121'y',95'_',110'n',105'i',99'c',107'k'} real_name = {109'm',121'y',32' ',114'r',101'e',97'a',108'l',32' ', 110'n',97'a',109'm',101'e'} sock_conn = <no value> sock_receive = <no value> buff = <no value> split_buff = <no value> ret = <no value> finish = <no value> inp = <no value> crlf = {13,10} Traced lines leading up to the failure: D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:323 myHttp4uErrorString = link_func(myTcp4uLib, "Http4uErrorString", D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:152 handle = define_c_func(dll, name, args, result) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:153 if handle = -1 then D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:156 return handle D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:327 myHttpIsValidURL = link_func(myTcp4uLib, "HttpIsValidURL", { D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:152 handle = define_c_func(dll, name, args, result) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:153 if handle = -1 then D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:156 return handle D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:338 myHttpGetFile = link_func(myTcp4uLib, "HttpGetFile", { D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:152 handle = define_c_func(dll, name, args, result) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:153 if handle = -1 then D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:156 return handle D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:344 myHttpGetFileEx = link_func(myTcp4uLib, "HttpGetFileEx", { D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:152 handle = define_c_func(dll, name, args, result) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:153 if handle = -1 then D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:156 return handle D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:370 ret = c_func(myTcp4uInit, {}) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:371 return ret D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:492 socket_addr = allocate(4) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:494 port_addr = allocate(2) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:495 poke(port_addr, port) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:497 server_addr = allocate_string(server) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:498 if sequence(service) then D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:503 ret = c_func(myTcpConnect, {socket_addr, server_addr, NULL, port_addr}) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:505 connect_socket = peek4u(socket_addr) ------=_NextPart_000_1155_36c2_4b8d Content-Type: text/plain; name="client_ex.err"; format=flowed Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="client_ex.err" D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:505 in function tcp4u_connect() type_check failure, connect_socket is 4294967295 server = {49'1',50'2',55'7',46'.',48'0',46'.',48'0',46'.',49'1'} service = 0 port = 32009 ret = -6 connect_socket = 4294967295 socket_addr = 3543024 port_addr = 3612528 service_addr = <no value> server_addr = 3623600 ... called from D:\Euphoria\Stuff\IO\TCP4U\client.exw:28 Global & Local Variables D:\EUPHORIA\include\machine.e: check_calls = 1 D:\EUPHORIA\include\get.e: input_file = <no value> input_string = <no value> string_next = <no value> ch = <no value> D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew: TCP4U_MAX_MSG_SIZE = 16384 TCP4U_STOP_STRING = {69'E',117'u',84'T',99'c',80'P',115's',84'T',111'o', 80'P'} myTcp4uLib = 268435456 myTcp4uInit = 0 myTcp4uCleanup = 1 myTcp4uVer = 2 myTcp4uEr = <no value> myTcp4uErrorString = 3 myTcpGetLocalID = 4 myTcpAccept = 5 myTcpConnect = 6 myTcpClose = 7 myTcpFlush = 8 myTcpGetListenSocket = 9 myTcpSend = 10 myTcpRecv = 11 myTcpRecvUntilStr = 12 myHttpIsValidURL = 18 myHttp4uSetBufferSize = 15 myHttp4uSetTimeout = 16 myHttp4uErrorString = 17 myHttpGetFile = 19 myHttpGetFileEx = 20 myTcpIsDataAvail = 13 myTcpGetRemoteID = 14 D:\Euphoria\Stuff\IO\TCP4U\client.exw: ret = <no value> char = <no value> port = 32009 sock_connect = <no value> sock_receive = <no value> server_name = {49'1',50'2',55'7',46'.',48'0',46'.',48'0',46'.',49'1'} Traced lines leading up to the failure: D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:323 myHttp4uErrorString = link_func(myTcp4uLib, "Http4uErrorString", D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:152 handle = define_c_func(dll, name, args, result) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:153 if handle = -1 then D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:156 return handle D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:327 myHttpIsValidURL = link_func(myTcp4uLib, "HttpIsValidURL", { D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:152 handle = define_c_func(dll, name, args, result) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:153 if handle = -1 then D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:156 return handle D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:338 myHttpGetFile = link_func(myTcp4uLib, "HttpGetFile", { D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:152 handle = define_c_func(dll, name, args, result) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:153 if handle = -1 then D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:156 return handle D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:344 myHttpGetFileEx = link_func(myTcp4uLib, "HttpGetFileEx", { D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:152 handle = define_c_func(dll, name, args, result) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:153 if handle = -1 then D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:156 return handle D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:370 ret = c_func(myTcp4uInit, {}) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:371 return ret D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:492 socket_addr = allocate(4) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:494 port_addr = allocate(2) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:495 poke(port_addr, port) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:497 server_addr = allocate_string(server) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:498 if sequence(service) then D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:503 ret = c_func(myTcpConnect, {socket_addr, server_addr, NULL, port_addr}) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:505 connect_socket = peek4u(socket_addr) ------=_NextPart_000_1155_36c2_4b8d Content-Type: text/plain; name="sendseq_ex.err"; format=flowed Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="sendseq_ex.err" D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:505 in function tcp4u_connect() type_check failure, connect_socket is 4294967295 server = {49'1',50'2',55'7',46'.',48'0',46'.',48'0',46'.',49'1'} service = 0 port = 32009 ret = -6 connect_socket = 4294967295 socket_addr = 3543024 port_addr = 3612528 service_addr = <no value> server_addr = 3623232 ... called from D:\Euphoria\Stuff\IO\TCP4U\send_seq.exw:27 Global & Local Variables D:\EUPHORIA\include\machine.e: check_calls = 1 D:\EUPHORIA\include\get.e: input_file = <no value> input_string = <no value> string_next = <no value> ch = <no value> D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew: TCP4U_MAX_MSG_SIZE = 16384 TCP4U_STOP_STRING = {69'E',117'u',84'T',99'c',80'P',115's',84'T',111'o', 80'P'} myTcp4uLib = 268435456 myTcp4uInit = 0 myTcp4uCleanup = 1 myTcp4uVer = 2 myTcp4uEr = <no value> myTcp4uErrorString = 3 myTcpGetLocalID = 4 myTcpAccept = 5 myTcpConnect = 6 myTcpClose = 7 myTcpFlush = 8 myTcpGetListenSocket = 9 myTcpSend = 10 myTcpRecv = 11 myTcpRecvUntilStr = 12 myHttpIsValidURL = 18 myHttp4uSetBufferSize = 15 myHttp4uSetTimeout = 16 myHttp4uErrorString = 17 myHttpGetFile = 19 myHttpGetFileEx = 20 myTcpIsDataAvail = 13 myTcpGetRemoteID = 14 D:\Euphoria\Stuff\IO\TCP4U\send_seq.exw: ret = <no value> port = 32009 sock_connect = <no value> server_name = {49'1',50'2',55'7',46'.',48'0',46'.',48'0',46'.',49'1'} remote_name = <no value> test_data = <no value> Traced lines leading up to the failure: D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:152 handle = define_c_func(dll, name, args, result) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:153 if handle = -1 then D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:156 return handle D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:338 myHttpGetFile = link_func(myTcp4uLib, "HttpGetFile", { D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:152 handle = define_c_func(dll, name, args, result) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:153 if handle = -1 then D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:156 return handle D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:344 myHttpGetFileEx = link_func(myTcp4uLib, "HttpGetFileEx", { D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:152 handle = define_c_func(dll, name, args, result) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:153 if handle = -1 then D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:156 return handle D:\Euphoria\Stuff\IO\TCP4U\send_seq.exw:14 port = 32009 -- port number to connect on D:\Euphoria\Stuff\IO\TCP4U\send_seq.exw:15 server_name = "127.0.0.1" -- server to connect to, "127.0.0.1" is current computer D:\Euphoria\Stuff\IO\TCP4U\send_seq.exw:19 puts(1, "Send Sequence Demo\n") D:\Euphoria\Stuff\IO\TCP4U\send_seq.exw:22 if tcp4u_init() != TCP4U_SUCCESS then D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:370 ret = c_func(myTcp4uInit, {}) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:371 return ret D:\Euphoria\Stuff\IO\TCP4U\send_seq.exw:27 sock_connect = tcp4u_connect(server_name, NULL, port) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:492 socket_addr = allocate(4) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:494 port_addr = allocate(2) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:495 poke(port_addr, port) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:497 server_addr = allocate_string(server) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:498 if sequence(service) then D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:503 ret = c_func(myTcpConnect, {socket_addr, server_addr, NULL, port_addr}) D:\Euphoria\Stuff\IO\TCP4U\tcp4u.ew:505 connect_socket = peek4u(socket_addr) ------=_NextPart_000_1155_36c2_4b8d--