Networking Forums

Networking Forums > Computer Networking > Linux Networking > Port winsock code to linux

Reply
Thread Tools Display Modes

Port winsock code to linux

 
 
Matthew Clark
Guest
Posts: n/a

 
      08-10-2006, 08:39 PM
Is there a good guide on porting winsock code to something more linux
friendly? I have some networking code originally written for 2000/XP
that I'd like to run natively under linux. It doesn't look terribly
complicated (famous last words, I know ;-), but a guide would
definitely smooth things along.

Thanks,

Matt

 
Reply With Quote
 
 
 
 
chris dewbery
Guest
Posts: n/a

 
      08-10-2006, 11:42 PM
Matthew Clark wrote:
> Is there a good guide on porting winsock code to something more linux
> friendly? I have some networking code originally written for 2000/XP
> that I'd like to run natively under linux. It doesn't look terribly
> complicated (famous last words, I know ;-), but a guide would
> definitely smooth things along.
>
> Thanks,
>
> Matt
>


Porting windows socket code to Linux is pretty straight forward.

It is my understanding that both implementations are based on the
BSD sockets layer (with minor variations). both seem to be
similar, apart from not having to initalise winsock on linux

you might find the following guide useful

http://beej.us/guide/bgnet/

Chris.
 
Reply With Quote
 
David Schwartz
Guest
Posts: n/a

 
      08-12-2006, 12:14 AM

chris dewbery wrote:

> Porting windows socket code to Linux is pretty straight forward.
>
> It is my understanding that both implementations are based on the
> BSD sockets layer (with minor variations). both seem to be
> similar, apart from not having to initalise winsock on linux


There are two differences that can bite you porting in this direction:

1) Linux does not have anything even remotely analogous to completion
routines, completion events, or completion ports.

2) Linux does not have anything like Windows events.

Note that if performance is an issue, it's much harder. The "best way"
to do things is totally different on the two platforms.

DS

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Winsock Port Error: The virtual circuit has been reset by the part eanyanwu143 Broadband Hardware 0 07-21-2008 01:42 PM
Checksum code in linux kernel Perianayagam Somasundaram Linux Networking 0 10-27-2005 04:44 AM
How hard it is port VxWorks code to Linux? santa19992000@yahoo.com Linux Networking 3 08-20-2005 11:48 AM
Firewall Service/Winsock Redirector Service alternatives on Linux? Nil Einne Linux Networking 1 02-26-2004 05:16 PM
Linksys now has GPL Code Center, for Linux Geeks! Bill Crocker Wireless Internet 2 07-07-2003 11:47 AM



1 2 3 4 5 6 7 8 9 10 11