>> > How can I connect two sockets? I have something like a small proxy and I
>> > just want to pass things through. Therefor I want to connect the client
>> > connected to me to the server I am connected to (like piping).
>> read client, send to server.
>> read server send to client.
>That is what I did. I read it into a buffer from the server and
>then wrote the buffer to the client. My problem: I do not know
>how big the sent Data (-> the buffer) will be (it could be some
>Megs).
The question "how big is the data" doesn't make any sense for
TCP. Just transfer the bytes back and forth in whatever sized
chunks you find convenient.
If you're using UDP, then transfer it it whatever sized chunks
you get -- I think the largest allowed chuck for UDP is 64k
bytes.
Quote:>So how can I connect the server and the client directly?
Wire?
--
Grant Edwards grante Yow! Yow! I want to mail
at a bronzed arti*to
visi.com Nicaragua!