HP3000-L Archives

October 2001, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Pete Vickers <[log in to unmask]>
Reply To:
Pete Vickers <[log in to unmask]>
Date:
Tue, 9 Oct 2001 12:47:09 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (76 lines)
Culled from http://www.catalyst.com/reports/tcpintro


     1.4 Service Ports

----------------------------------------------------------------------------
----

In addition to the IP address of the remote system, an application also
needs to know how to address the specific program that it wishes to
communicate with. This is accomplished by specifying a service port, a
16-bit number that uniquely identifies an application running on the system.
Instead of numbers, however, service names are usually used instead. Like
hostnames, service names are usually matched to port numbers through a local
file, commonly called services. This file lists the logical service name,
followed by the port number and protocol used by the server.

A number of standard service names are used by Internet-based applications
and these are referred to as well-known services. These services are defined
by a standards document and include common application protocols such as
FTP, POP3, SMTP and HTTP.

Remember that a service name or port number is a way to address an
application running on a remote host. Because a particular service name is
used, it doesn't guarantee that the service is available, just as dialing a
telephone number doesn't guarantee that there is someone at home to answer
the call.


     1.5 Sockets

----------------------------------------------------------------------------
----

The previous sections described what information a program needs to
communicate over a TCP/IP network. The next step is for the program to
create what is called a socket, a communications end-point that can be
likened to a telephone. However, creating a socket by itself doesn't let you
exchange information, just like having a telephone in your house doesn't
mean that you can talk to someone by simply taking it off the hook. You need
to establish a connection with the other program, just as you need to dial a
telephone number, and to do this you need the socket address of the
application that you want to connect to. This address consists of three key
parts: the protocol family, Internet Protocol (IP) address and the service
port number.

We've already talked about the IP address and service port, but what's the
protocol family? It's a number which is used to logically designate the
group that a given protocol belongs to. Since the socket interface is
general enough to be used with several different protocols, the protocol
family tells the underlying network software which protocol is being used by
the socket. In our case, the Internet Protocol family will always be used
when creating sockets. With the protocol family, IP address of the system
and the service port number for the program that you want to exchange data
with, you're ready to establish a connection.


Pete


"Steve" <[log in to unmask]> wrote in message
news:9pv7t102ko3@enews2.newsguy.com...
> Can someone tell me the difference between a socket
> and a port as it relates to TCP/IP I'm writing a program
> that communicates with a VB client using NetIPC calls and a
> port number. The documentation refers to socket and port
> as basically the same thing. I've been told the two are
> different but not as to why.
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2