[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: [CPROG] Links til god guide



Nils Åke Ljunggren wrote:

Hej Lars

Vi kan ikke være mere enige i kritikken af winsockx -- i forhold til winsockx foretrækker jeg langt Java.

Min pointe var at Java's sockets ikke bragte sockets op på et "højere" niveau end C -- og her mener jeg BSD!

Indtil videre foretrækker jeg BSD sockets i C -- men jeg arbejder på et C++ alternativ sanktioneret af BS.


Med venlig hilsen


Nils Åke Ljunggren


Er Javas sockets ikke på et højere niveau end BSD sockets ?

try
{
   ServerSocket server = new ServerSocket(9999);
   Socket client = server.accept();
   client.write("Hello World!".getBytes());
   client.close();
   server.close();
}catch(Exception e)
{
}

Prøv at gøre det samme med BSD sockets. Jeg har lavet et socket bibliotek i C++ så jeg kan gøre det samme (sådan circa), men hvis man kun bruger BSD socket biblioteket, skal der en del flere linjer til, og man skal kende et par datastrukturer og funktions kald.
Så efter min mening er Javas sockets langt nemmere at bruge til TCP/UDP kommunikation, og jeg har aldrig haft brug for andet (endnu).


VH

Robert

--
"I could use a heart. A human heart.
I need to pump a lot of blood out of my basement"
                                         - Bender




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

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