Francesco,

I don't think your question has to do with RTL.... but I HAVE written a
program which collects data via an RT process and passes off the data
to a non-RT process, which proceeds to redistribute the data to client
processes via sockets. It seems to work OK....

I can send you my source code although I am hardly an expert on this subject.
Email me off the rtl list with questions on this topic. But as long as I am typing 
this, I'll take a shot at it....

Things look OK..... except you may need to call htons(port_number) before
you bind.... I forget the specifics, but their is a byte order reversal that exists
between client & server..... this may only be true if your host is one endian
type and your client another (as is my case)... but if this is true then your
clients may be trying to connect to port number 25115 (0x621B) instead of
7010 (0x1B62).

Dan


-----Original Message-----
From:   Francesco Giuffrida [SMTP:[EMAIL PROTECTED]]
Sent:   Thursday, April 15, 1999 10:08 AM
To:     [EMAIL PROTECTED]
Subject:        [rtl] Trouble  on STREAM Socket  Connections

Setting Up aSocket Stream Client Server Connection un RTLinux I found 
the following troubles:
The Server does not seem  to send SIGIO signal to Client on sending 
the message (or is the client that does not linsten to the signals..)
What  I've done is:

On server:
mysock = socket(AF_INET, SOCK_STREAM, 0)
bind.....
listen....
ClientSock=(accept(......))

send(ClientSock, buf,100);


On Client:
mysock = socket(AF_INET, SOCK_STREAM,0);

connect(......)

fcntl(mysock, F_SETOWN, getpid());
signal(SIGIO, HandSigio);

while(1)
  sleep(1);

then the event handler:

void HandSigio(int sig)
{
 read(mysock, buf, dim);
...
}

The trouble I never have the reception of the socket packet...
what's wrong?



______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/

Reply via email to