[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
 

[c]oprette tcp socket i en funktion, skrive til den fra en anden



hejsa
Jeg sidder lige og debugger et lille program, og er stødt på et
underligt problem. Jeg har en tcp socket som bliver åbnet og der bliver
forbundet til en anden maskine. Dette sker i en funktion. Linjen holdes
åben. I en anden funktion skriver jeg så til samme socket via write. 
Socket fd er selvfølgelig defineret i global scope. 

Er ideeen ikke at man med sockets netop kan skrive(write) til en
forbindelse imens man også lytter (read) på den ? 

Her printer den i stedet det sendte til stdout. 

Er det mid der skal debugge lidt mere, eller er det virkeligt sådan at
jeg ikke kan skrive på den socket samtidigt med at jeg læser på den? 


(læsefunktionen kører i en pthread) 




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:10 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] *