
sockets and ports -- bind()
Quote:
>can some one please just give me some example code as to how I could
>on a unix/linux system open up a port (9812) and when some one telnet's
>into the machines ip on port 9812 it prints out "wow, it works"
Unfortunately C doesn't have any socket support or support for any other
form of networking so this is not possible. Many OSs or compilers do
provide such support however the details are specific to those systems.
For example both Windows and Unix systems provide socket library calls
but the details are not identical. You'll have to ask in relevant
compiler/OS related newsgroup. For Unix that would be comp.unix.programmer,
there is a slocket related newsgroup for Windows called
comp.os.ms-windows.programmer.tools.winsock and there are various
programming newsgroups for other OSs.
--
-----------------------------------------
-----------------------------------------