LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-30-2004, 10:32 AM   #1
jhon
Member
 
Registered: Aug 2004
Posts: 32

Rep: Reputation: 15
how to use it?


Hi,

I'm learning UNIX for the first time...

Q1) does anybody know how should I change the line

_sock(WSASocket(AF_INET, SOCK_STREAM, 0, NULL< 0, WSA_FLAG_OVERLAPPED)

from WINDOWS to UNIX?

Q2) I found out for exactly that in WINDOWS AF_INET is defined as 2. may I use this define in UNIX and will it work properly?

if not, where can I list that translates WINDOWS expressions/ macros to UNIX's ones?

thankx guys
 
Old 08-30-2004, 11:43 AM   #2
warned
LQ Newbie
 
Registered: Oct 2003
Distribution: Mandrake and RH
Posts: 22

Rep: Reputation: 15
In linux you can create the socket with

sock = socket ( AF_INET, SOCK_STREAM, 0 );

You can read a complete command explanation vith

man socket

Secondly, in Linux is defined AF_INET too as 2. You can use it as well.
 
Old 08-30-2004, 12:09 PM   #3
jhon
Member
 
Registered: Aug 2004
Posts: 32

Original Poster
Rep: Reputation: 15
THANKS FOR YOUR HELP
 
  


Reply



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 Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration