Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C and Ports

Status
Not open for further replies.

Kadirpatel

Programmer
Mar 28, 2001
43
0
0
GB
Hi All,
I want to read the data that comes to my PC port 80. I want to know that how can I read the data using Turbo C ?
Thanks.
 
Three functions are there in Turbo C for reading data from the hardware port.

int inportb(int portid);
int inp(unsigned portid);
unsigned inpw(unsigned portid);

What about port 80 ?.

Maniraja S
 
Hi Maniraja S,
I dont have much knowledge about Internet. But I wanted to tell that, I wanted to do some Networking programming using C. My PC is connected to a LAN. So I think that the data arrives on port 80 and so i wanted to collected the data from there. Also I want to ask whether the data is encoded. If yes then how to decode it? Or let me know some site from where I can collect some information from. I know that there is more support for Network Programming in ANSI C. Can I get ANSCI C from somewhere?
Thanks.
Waiting for replies.
 
Kadirpatel,

What you need to do is set up a listening socket for TCP port 80. There are standard POSIX system calls which allow you to do this, namely socket(), listen(), and accept(). I do not know if Turbo C provides these calls or not. If not they are supported in Visual C++ or gcc.

Brudnakm
 
There are 2 faq in the C-Builder forum

faq101-993 for clients Sockets

and

faq101-1000 for Server Sockets.

it is pure c-Code
hnd
hasso55@yahoo.com

 
Hi All,
Thanks for your kind support. I will look for these things and if any problem, i will again ask for your help.
Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top