Async Socket under Linux

Async Socket under Linux

Post by Vincen » Thu, 04 May 2000 04:00:00



Hello,

I would like to know if is there a way to code Async Socket under
linux... in order to have the OnConnect, OnAccept, OnClose event etc...

someone has code samples ?

thx

 
 
 

Async Socket under Linux

Post by Barry Margoli » Thu, 04 May 2000 04:00:00




>I would like to know if is there a way to code Async Socket under
>linux... in order to have the OnConnect, OnAccept, OnClose event etc...

>someone has code samples ?

Look up "SIGIO signal" and "O_ASYNC constant" in the Index of the book
"Unix Network Programming, Vol.1" by W. Richard Stevens.

--

Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

Async Socket under Linux

Post by Vincen » Fri, 05 May 2000 04:00:00


Quote:> Look up "SIGIO signal" and "O_ASYNC constant" in the Index of the book
> "Unix Network Programming, Vol.1" by W. Richard Stevens.

thx.

I know that i can create async socket by this way and ask the system to tell
me when
a socket event occur on my socket... but i don't know how to make the
difference
between SIGIO coming from an OnRead event, a SIGIO coming from a OnClose
event. is it possible to see a diference between the different signals ?

thx again.

 
 
 

Async Socket under Linux

Post by Barry Margoli » Fri, 05 May 2000 04:00:00




>> Look up "SIGIO signal" and "O_ASYNC constant" in the Index of the book
>> "Unix Network Programming, Vol.1" by W. Richard Stevens.

>thx.

>I know that i can create async socket by this way and ask the system to tell
>me when
>a socket event occur on my socket... but i don't know how to make the
>difference
>between SIGIO coming from an OnRead event, a SIGIO coming from a OnClose
>event. is it possible to see a diference between the different signals ?

No.  After receiving the signal you can use select() to determine whether
the socket is ready to read or write.  And the only way to tell the
difference between OnRead and OnClose is to actually read from the socket;
if you get data, it was ready to read, but if you get EOF it was closed.

--

Genuity, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

1. Problem adding tty port using 128 Port Async Adapter with 16 port Async Node

This system is  43P-140 AIX 4.2.1.x  with PCI 128 port Async. with 2 16 port
RAN EIA-232

I am tring to add tty ports to my ran system.  When I go to to smit

1)smitty tty
2)Add a TTY
3)tty rs232 Asynchronous Terminal
4)sa3 Available 04-05-22 16-Port RAN EIA-232 for 128-Port Adapter

I then get this error message
1800-109 There are currently no additional
SMIT screen entries available fo this
item  This item may require installation of
additional software before it can be accessed.

I have these files loaded

  devices.pci.4f111b00.asw   4.2.1.0  COMMITTED  PCI 128-Port Asynchronous
  devices.pci.4f111b00.diag  4.2.1.2  COMMITTED  RISC PC PCI Async 128 Port
  devices.pci.4f111b00.rte   4.2.1.2  COMMITTED  PCI 128-Port Asynchronous
  devices.pci.4f111b00.rte   4.2.1.0  COMMITTED  PCI 128-Port Asynchronous
  devices.common.IBM.cx.rte 4.2.1.2 COMMITTED CX Common Adapter Software

 I noticed devices.pci.4f111b00.rte   4.2.1.0 is defferent version I 4.2.1.2
from
 ibm web site but failed know how to get it to load twice (newbie).

I also notice I have devices.pci.4f111100.com 4.2.1.2 COMMITTED PCI 8-Port
Asynchronous Adapter
Can not uloaded this smit deinstall reports dependents for these

devices.pci.4f111b00.rte   4.2.1.0  COMMITTED  PCI 128-Port Asynchronous
devices.pci.4f111b00.diag  4.2.1.2  COMMITTED  RISC PC PCI Async 128 Port

This may be were the problem is.

Thanks for any help,
Lance Adams

2. Wearnes CDD110 instal problems

3. To async or not not async

4. Sound: Replace beep with other sound thru pc speaker/sound card?

5. async multiple sockets

6. Quick resource control question

7. ASYNC I/O with sockets

8. Linux 2.0 new features

9. Async Sockets...

10. help on async, nonblocking sockets

11. Avoid Async I/O for Socket Application

12. Async Sockets ...

13. Problems with Async Socket I/O on SUN-OS