answersLogoWhite

0

What is socket programming in C?

Updated: 12/23/2022
User Avatar

Wiki User

15y ago

Best Answer

There is nothing called "socket programming in C."

Sockets can be programmed in any programming language. What follows below is a basic idea on how to program sockets.

Socket programming refers to the use of a set of APIs for sending and receiving data over a network. The socket APIs originated on the BSD OS standardized by POSIX and are now found on UNIX, Linux, Windows, and Mac OS.

The concept of a socket is an abstraction for an end point in network communication through which data can be sent to and received from.

The major socket API functions are:

* socket() -- creates a socket of specified type and protocol * bind() -- assigns a local name or address to the socket (in the IP protocol this is usually an IP address and port * connect() -- connects a socket to a remote end point * listen() -- changes the socket's state to listen for incoming connections * accept() -- accepts an incoming connection and returns a new socket for communication over that connection * send() -- send data to remote end point specified with connect() call * sendto() -- in connectionless protocols such as UDP, sends data to a specified remote end point * recv() -- receive data from remote end point (after connection established) * recvfrom() -- receive data from a specified remote end point in connectionless protocol * getsockopt() -- gets current value for a particular socket option

* setsocketoption() -- set value of a particular socket option

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is socket programming in C?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Where can one get a book on Socket Programming in C?

You can typically find books on Socket Programming in C at major online retailers like Amazon or through specialty bookstores that focus on technical or programming topics. Additionally, many public and university libraries may have copies available to borrow.


What is shoket programming in networking?

you mean "socket programming". it is an programming model which used socket to represent connection points in some network


What is c and c in computer programming?

C and C++ are both high-level programming languages.


Create a spiral in C programming?

create spiral in c programming?


Where you can find tutorials for socket programming in PHP?

I have added a link to a Socket Programming in PHP guide to the related links section below. That should supply all the information you need to learn.


What has the author Robert Lafore written?

Robert Lafore has written: 'Object-oriented programming in Microsoft C++' -- subject(s): Object-oriented programming (Computer science), C++ (Computer program language), C. 'Microsoft C. Programming for the I.B.M.Personal Computer' 'Object-oriented programming in C++' 'Windows Programming Made Ridiculously Easy Book' 'The Waite Group's C Programming Using Turbo C++ (The Waite Group)' 'Microsoft C programming for the IBM' 'The Waite Group's Microsoft C programming for the PC' -- subject(s): C (Computer program language), IBM microcomputers, Microsoft C (Computer program), Microsoft C., Programming


When was C - programming language - created?

C - programming language - was created in 1972.


What is a C compiler as used in C programming?

In C programming, C compiler is user to translate C source into C object module.


What is the benefit of the C programming languages?

C language is better for hardware programming .Most of the programming for hardware are written in C language so it is beneficial for hardware programming is not efficient for application programming due to drawback like in C data moves around the system.


Name of object oriented programming language?

C++ is the name of a programming language.


Where can one find C programming tutorials?

You can find C programming tutorials online at the C programming website. They provide both free and paid tutorials for many aspects of the C and C++ code.


Websites to download c C programming language books?

Download 1000s of C C C++ Programming Language. http://www.guruengineers.com