www.digitalmars.com         C & C++   DMDScript  

D - sockets in linux

reply "Carlos Santander B." <carlos8294 msn.com> writes:
I'm sure this isn't complete, but it's a start anyway. It compiles and I
tried it a bit, but the weirdest thing happens:

I wrote 2 simple programs: the client reads a string from stdin, sends it to
the server, the server outputs to stdout, sends it back to the client, the
client outputs to stdout. The client creates the socket properly: I checked.
However, for some reason, the server doesn't seem to go beyond the socket()
function (if I could debug it, it could be better).

Anyway, give it a try, correct it, etc., etc.

-------------------------
Carlos Santander


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.483 / Virus Database: 279 - Release Date: 2003-05-19
May 21 2003
parent "Carlos Santander B." <carlos8294 msn.com> writes:
"Carlos Santander B." <carlos8294 msn.com> escribiσ en el mensaje
news:bah52n$fpc$1 digitaldaemon.com...
|
| However, for some reason, the server doesn't seem to go beyond the
socket()
| function (if I could debug it, it could be better).
|

I tried it again, and it seems that I had commited a coding mistake
initializing one of the structs in the client (so the server was
alright...). The only change I had to do in Socket.d was declare bcopy, and
then it worked perfectly.

I also tried to include select, pselect, etc., but I ran into some trouble
with FD_SET et al because of my lack of knowledge with asm.

—————————————————————————
Carlos Santander
"Carlos Santander B." <carlos8294 msn.com> escribiσ en el mensaje
news:bah52n$fpc$1 digitaldaemon.com...
|
| However, for some reason, the server doesn't seem to go beyond the
socket()
| function (if I could debug it, it could be better).
|

I tried it again, and it seems that I had commited a coding mistake
initializing one of the structs in the client (so the server was
alright...). The only change I had to do in Socket.d was declare bcopy, and
then it worked perfectly.

I also tried to include select, pselect, etc., but I ran into some trouble
with FD_SET et al because of my lack of knowledge with asm.

—————————————————————————
Carlos Santander
May 24 2003