Hi,

 

I have an assembler concurrent server using the EZASMI interface, I am using
4 ports from my IP address 192.168.1.111 I do a socket,bind listen using
ip,port,socket

I create four subtasks (ATTACH) to process connection on these 4 ports, I
pass these task a parameter list of KEY 8 subpool 1 storage by which I will
communication with them e.g. ECB and socket info

This is a layout of that storage 

 

THREAD_DSECT DSECT                                  

ECB_ADDR     DS  XL4      FOR SUBTASK TO WAIT FOR WORK

TASK_ADDR_1  DS  XL4      TCB ADDRESS               

SOCKET       DS  XL2      ORIGNAL SOCKET OF SERVER          

SERV_SOCK    DS  XL2      SOCKET CREATE VIA accept API     

FIN_ECB      DS  XL4                                

END_ECB      DS  XL4                                

TIE_DSECT    DS  XL(TIELENTH)  TASK WORK AREA       

 

 

Then I wait…….

 

When I get incoming connection via SELECT/ACCEPT I move the low order ½ from
retocde from the accept call which is the new socket I will be communicating
to SERV_SOCK so far so good

(it happens to be a 4). I then do a GIVESOCKET using the SERV_SOCK (4)
getting a return code 0, 

 

I then POST the subtask to execute the TAKESOCKET using the SERV_SOCK  were
I get errno of X’71’

 

    113              EBADF      TAKESOCKET  the socket has already been
taken       

 

Am I doing anything wrong in this scenario

 

 

   Thanks                                                    

  

 


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to