1. RE: tcp4u
- Posted by sephiroth _ <euman2376 at yahoo.com> May 05, 2001
- 545 views
> http://rapideuphoria.com:80 gets me a page from Pacific Tech touting > their > web hosting services.?? yeah. i don't use tcp4u, but when i try to load www.rapideuphoria.com with a proxy server i wrote in java myself, or even in Opera sometimes, i get "addr.com web hosting". what's up with that? is robert sharing a hostname?
2. RE: tcp4u
- Posted by Colin Bayer <colin_bayer at excite.com> Mar 28, 2001
- 500 views
The two possibilities you mention are one and the same. tcp4u_get_listen_socket only opens up a socket, it doesn't make the socket accept connections. You have to call tcp4u_accept in order for the socket to be of any value, but until you find a way to thread execution, there is no way to run a multi-connection server, at least with any acceptable speed. breenr at iglou.com wrote: > Okay, first of all, EuSock is a bit weird. It has all of them Win32lib > errors, so I won't mess with that right now. > I'm using tcp4u currently, but there seems to be a problem. I CAN'T GET > IT TO CONNECT. ARG. It's driving me crazy. Right now, I'm pretty much > copying and pasting statements, and modifying them as need be. I'm 100% > sure the syntax is correct. So, I was scurininzing tcp4u_connect in > manual.html, and something caught my eye. It said it connects to sockets > doing a tcp4u_accept. Now, I really hope this isn't true, but does this > only work with server specifically doing a tcp4u_accept, or all server > just generally accepting connections? > > > Btw, for reference, here is the statement I'm using: > sock_connect = tcp4u_connect(server_name, NULL, port) > > No problem as far as I can tell. I have narrowed it down to this > statement using trace. > > May try my hand at libnet if this doesn't work. I really like tcp4u > though. > "God is dead." -- Nietzsche Colin Bayer colin underline bayer at excite dot com
3. RE: tcp4u
- Posted by mhance at harris.com Aug 12, 2003
- 495 views
Pete ... I ran into this many moons ago. As I remember it simply is the way the receive data is retrieved. In the single byte mode, the TCP return is a single sequence, but in the multiple byte mode, it isn't. I get my answer and sample code directly from Ray , and its work great. I do allot of socket work, so I needed the larger amount of data ... Oh, while I'm getting the info, I use the single byte mode in some windows management software I wrote. And the results are surprisingly fast. However, you have to do this : sock receive = tcp4u_receive(sock, 1, -1) See the -1 in the timeout field above ?? I don't know why ( no doc on this ) but the function returns IMMEDIATELY !!! In my windows programs EVENT loop, I call this function. I never miss data and its really quite fast. However, I don't use this all the time .... I get back to you on the data I got from Ray on your problem ... Regards ... Mike -----Original Message----- From: pete_stoner at btconnect.com [mailto:pete_stoner at btconnect.com] Sent: Tuesday, August 12, 2003 9:27 AM To: EUforum Subject: tcp4u Hi All I'm trying to use TCP4U, I've got it all working both sending and receiving data (on the backchannel) , the send fuction is fine, however if I try receiving more than one byte at a time I get an error sock_receive = tcp4u_receive(sock, 1, 1) if sock_receive[tcp4u_ret] = TCP4U_SUCCESS then -- code snipped else appendText(IPDS_RE,sprintf( "\n tcp4u_receive error '%s'\n", {tcp4u_error_string(sock_receive[tcp4u_ret])} )) -- works fine but slowwwwly But sock_receive = tcp4u_receive(sock, 1000, 1) if sock_receive[tcp4u_ret] = TCP4U_SUCCESS then -- code snipped else appendText(IPDS_RE,sprintf( "\n tcp4u_receive error '%s'\n", {tcp4u_error_string(sock_receive[tcp4u_ret])} )) -- gives me an error of 'Not a TCP4 return code' I've tried this on both W2K and XP, I do not need to do anything wth the received data, I just want to clear the other devices buffer.. it's bound to be something I am doing wrong.... Has anyone got any suggestions? --^---------------------------------------------------------------- This email was sent to: mhance at harris.com TOPICA - Start your own email discussion group. FREE!
4. RE: tcp4u
- Posted by mhance at harris.com Aug 12, 2003
- 476 views
Pete .. OK here's what 's really going on ... The function : sock_receive = tcp4u_receive(sock, 1, 1) returns a sequence { bytes returned, {byte1,byte2, etc }}. So when you ask for only a single byte, the sock_receive[tcp4u_ret] integer is a 1 ( which there is a resturn code for this !!! ) However, when you ask for more than 1 byte, say you ask for 10 : sock_receive = tcp4u_receive(sock, 10, 1) Then sock_recieve[tcp4u_ret] is actually a 10 !!! There is NO return code 10 !!! So in my programs, I simply do this : sock_receive = tcp4u_receive(sock, 1000, 1) if sock_receive[tcp4u_ret] >= TCP4U_SUCCESS then -- note the greater than symbol !! -- code snipped else Try it. It will work just fine .... good luck ... Mike -----Original Message----- From: pete_stoner at btconnect.com [mailto:pete_stoner at btconnect.com] Sent: Tuesday, August 12, 2003 9:27 AM To: EUforum Subject: tcp4u Hi All I'm trying to use TCP4U, I've got it all working both sending and receiving data (on the backchannel) , the send fuction is fine, however if I try receiving more than one byte at a time I get an error sock_receive = tcp4u_receive(sock, 1, 1) if sock_receive[tcp4u_ret] = TCP4U_SUCCESS then -- code snipped else appendText(IPDS_RE,sprintf( "\n tcp4u_receive error '%s'\n", {tcp4u_error_string(sock_receive[tcp4u_ret])} )) -- works fine but slowwwwly But sock_receive = tcp4u_receive(sock, 1000, 1) if sock_receive[tcp4u_ret] = TCP4U_SUCCESS then -- code snipped else appendText(IPDS_RE,sprintf( "\n tcp4u_receive error '%s'\n", {tcp4u_error_string(sock_receive[tcp4u_ret])} )) -- gives me an error of 'Not a TCP4 return code' I've tried this on both W2K and XP, I do not need to do anything wth the received data, I just want to clear the other devices buffer.. it's bound to be something I am doing wrong.... Has anyone got any suggestions? --^---------------------------------------------------------------- This email was sent to: mhance at harris.com TOPICA - Start your own email discussion group. FREE!
5. RE: tcp4u
- Posted by Robert Szalay <robsz1 at hotpop.com> Aug 12, 2003
- 492 views
> Then sock_recieve[tcp4u_ret] is actually a 10 !!! There is NO >return > code 10 !!! There is a very simple explenation for this. The returned value is *NOT* a return code. It is the number of bytes that were received. If.. sock_receive = tcp4u_receive(sock, 93, 1) Then sock_recieve[tcp4u_ret] = 93 Which means it sucessfully received 93 bytes of data. Otherwise, it did not receive all 93 bytes of data. Regards, Robert Szalay
6. RE: tcp4u
- Posted by mhance at harris.com Aug 13, 2003
- 492 views
Correct ... The original examples, and code Ray has, would lead one to believe a ret code is expected, as in the naming. However, if you examine the actual TCP4U C ++ programs and DLL from which it was derived, you can get to the bottom of it ... which is to say that the sock_recieve returns two pieces of data , an integer which indicates the actual number of bytes returned, following by sequence of bytes .... -----Original Message----- From: Robert Szalay [mailto:robsz1 at hotpop.com] Sent: Tuesday, August 12, 2003 6:20 PM To: EUforum Subject: RE: tcp4u > Then sock_recieve[tcp4u_ret] is actually a 10 !!! There is NO >return > code 10 !!! There is a very simple explenation for this. The returned value is *NOT* a return code. It is the number of bytes that were received. If.. sock_receive = tcp4u_receive(sock, 93, 1) Then sock_recieve[tcp4u_ret] = 93 Which means it sucessfully received 93 bytes of data. Otherwise, it did not receive all 93 bytes of data. Regards, Robert Szalay --^---------------------------------------------------------------- This email was sent to: mhance at harris.com TOPICA - Start your own email discussion group. FREE!