[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] UDP sockets i linux



Anders Gnistrup skrev:


Jeg har to processer, der skal udveksle data, men med mindre jeg kalder bind(), kan jeg ikke få recvfrom() til at fungere. Så snart den ene proces har kaldt bind, kan den anden ikke.

Det er ikke muligt at kalde bind() med de samme socket date to gange. Socket file descriptoren er jo blevet låst til den første process.
Det du kan gøre er at den første proces er server (kalder bind) og den anden blot er client. clienten har ikke behov for at kalde bind. Den skal sådan set blot vide hvor den skal sende tingene hen og modtage fra.

Din løsning skal baseres på hvilket problem du ønsker at løse. Er der et master/slave forhold mellem de to processor? skal de begge fungere som master?

Hilsen Anders





 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-10-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *