Misplaced Pages

Winsock

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

A Berkeley ( BSD ) socket is an application programming interface (API) for Internet domain sockets and Unix domain sockets , used for inter-process communication (IPC). It is commonly implemented as a library of linkable modules. It originated with the 4.2BSD Unix operating system, which was released in 1983.

#894105

105-491: In computing , the Windows Sockets API ( WSA ), later shortened to Winsock , is an application programming interface (API) that defines how Windows network application software should access network services, especially TCP/IP . It defines a standard interface between a Windows TCP/IP client application (such as an FTP client or a web browser ) and the underlying TCP/IP protocol stack . The nomenclature

210-521: A binary system meant that Zuse's machines were easier to build and potentially more reliable, given the technologies available at that time. The Z3 was not itself a universal computer but could be extended to be Turing complete . Zuse's next computer, the Z4 , became the world's first commercial computer; after initial delay due to the Second World War, it was completed in 1950 and delivered to

315-632: A central processing unit (CPU) in the form of a microprocessor , together with some type of computer memory , typically semiconductor memory chips. The processing element carries out arithmetic and logical operations, and a sequencing and control unit can change the order of operations in response to stored information . Peripheral devices include input devices ( keyboards , mice , joysticks , etc.), output devices ( monitors , printers , etc.), and input/output devices that perform both functions (e.g. touchscreens ). Peripheral devices allow information to be retrieved from an external source, and they enable

420-539: A file descriptor for the socket. It uses three arguments: The function returns -1 if an error occurred. Otherwise, it returns an integer representing the newly assigned descriptor. bind() associates a socket with an address. When a socket is created with socket() , it is only given a protocol family, but not assigned an address. This association must be performed before the socket can accept connections from other hosts. The function has three arguments: bind() returns 0 on success and -1 if an error occurs. After

525-419: A keyboard , and computed and printed the results, demonstrating the feasibility of an electromechanical analytical engine. During the first half of the 20th century, many scientific computing needs were met by increasingly sophisticated analog computers, which used a direct mechanical or electrical model of the problem as a basis for computation . However, these were not programmable and generally lacked

630-524: A mass-production basis, which limited them to a number of specialized applications. At the University of Manchester , a team under the leadership of Tom Kilburn designed and built a machine using the newly developed transistors instead of valves. Their first transistorized computer and the first in the world, was operational by 1953 , and a second version was completed there in April 1955. However,

735-429: A monolithic integrated circuit (IC) chip. Kilby's IC had external wire connections, which made it difficult to mass-produce. Noyce also came up with his own idea of an integrated circuit half a year later than Kilby. Noyce's invention was the first true monolithic IC chip. His chip solved many practical problems that Kilby's had not. Produced at Fairchild Semiconductor, it was made of silicon , whereas Kilby's chip

840-652: A 1998 retrospective, it was the first working machine to contain all of the elements essential to a modern electronic computer. As soon as the Baby had demonstrated the feasibility of its design, a project began at the university to develop it into a practically useful computer, the Manchester Mark 1 . The Mark 1 in turn quickly became the prototype for the Ferranti Mark 1 , the world's first commercially available general-purpose computer. Built by Ferranti , it

945-512: A Chip (SoCs) are complete computers on a microchip (or chip) the size of a coin. They may or may not have integrated RAM and flash memory . If not integrated, the RAM is usually placed directly above (known as Package on package ) or below (on the opposite side of the circuit board ) the SoC, and the flash memory is usually placed right next to the SoC. This is done to improve data transfer speeds, as

1050-472: A TCP socket by calling the socket() function with the parameters for the protocol family ( PF INET , PF_INET6 ), the socket mode for stream sockets ( SOCK_STREAM ), and the IP protocol identifier for TCP ( IPPROTO_TCP ). Establishing a TCP server involves the following basic steps: The following program creates a TCP server listening on port number 1100: Programming a TCP client application involves

1155-440: A connected socket. However it was a design goal of Windows Sockets that it should be relatively easy for developers to port socket-based applications from Unix to Windows. It was not considered sufficient to create an API which was only useful for newly written Windows programs. For this reason, Windows Sockets included a number of elements which were designed to facilitate porting. For example, Unix applications were able to use

SECTION 10

#1732802318895

1260-479: A connection. Certain types of protocols are connectionless, most notably the User Datagram Protocol . When used with connectionless protocols, connect defines the remote address for sending and receiving data, allowing the use of functions such as send and recv . In these cases, the connect function prevents reception of datagrams from other sources. connect() returns an integer representing

1365-514: A contract. The API guarantees that a conforming application will function correctly with a conforming protocol implementation from any network software vendor. The SPI contract guarantees that a conforming protocol module may be added to Windows and will thereby be usable by an API-compliant application. Although these contracts were important when Windows Sockets was first released, since network environments required multi-protocol support (see above) they are now of only academic interest. Included in

1470-505: A hardware/software bundle. When Windows 2.0 was released, these vendors were joined by others such as Distinct and NetManage in offering TCP/IP for Windows. The drawback faced by all of these vendors was that each of them used their own API (Application Programming Interface). Without a single standard programming model, it was difficult to persuade independent software developers to create networking applications which would work with any vendor's underlying TCP/IP implementation. Add to this

1575-403: A medieval European counting house , a checkered cloth would be placed on a table, and markers moved around on it according to certain rules, as an aid to calculating sums of money. The Antikythera mechanism is believed to be the earliest known mechanical analog computer , according to Derek J. de Solla Price . It was designed to calculate astronomical positions. It was discovered in 1901 in

1680-525: A much more general design, an analytical engine , was possible. The input of programs and data was to be provided to the machine via punched cards , a method being used at the time to direct mechanical looms such as the Jacquard loom . For output, the machine would have a printer, a curve plotter and a bell. The machine would also be able to punch numbers onto cards to be read in later. The engine would incorporate an arithmetic logic unit , control flow in

1785-500: A new addrinfo data structure. This pair of functions appeared at the same time as the BSD socket API proper in 4.2BSD (1983), the same year DNS was first created. Early versions did not query DNS and only performed /etc/hosts lookup. The 4.3BSD (1984) version added DNS in a crude way. The current implementation using Name Service Switch derives Solaris and later NetBSD 1.4 (1999). Initially defined for NIS+ , NSS makes DNS only one of

1890-529: A number of successes at breaking encrypted German military communications. The German encryption machine, Enigma , was first attacked with the help of the electro-mechanical bombes which were often run by women. To crack the more sophisticated German Lorenz SZ 40/42 machine, used for high-level Army communications, Max Newman and his colleagues commissioned Flowers to build the Colossus . He spent eleven months from early February 1943 designing and building

1995-562: A sequence of sets of values. The whole machine was to be controlled by a read-only program, which was complete with provisions for conditional branching . He also introduced the idea of floating-point arithmetic . In 1920, to celebrate the 100th anniversary of the invention of the arithmometer , Torres presented in Paris the Electromechanical Arithmometer, which allowed a user to input arithmetic problems through

2100-419: A socket has been associated with an address, listen() prepares it for incoming connections. However, this is only necessary for the stream-oriented (connection-oriented) data modes, i.e., for socket types ( SOCK_STREAM , SOCK_SEQPACKET ). listen() requires two arguments: Once a connection is accepted, it is dequeued. On success, 0 is returned. If an error occurs, -1 is returned. When an application

2205-460: A successful demonstration of its use in computing tables in 1906. In his work Essays on Automatics published in 1914, Leonardo Torres Quevedo wrote a brief history of Babbage's efforts at constructing a mechanical Difference Engine and Analytical Engine. The paper contains a design of a machine capable to calculate formulas like a x ( y − z ) 2 {\displaystyle a^{x}(y-z)^{2}} , for

SECTION 20

#1732802318895

2310-404: A technical argument of no practical consequence. Indeed, much confusion exists in the proper usage of both forms. The POSIX.1—2008 specification doesn't specify any PF -constants, but only AF -constants Raw sockets provide a simple interface that bypasses the processing by the host's TCP/IP stack. They permit implementation of networking protocols in user space and aid in debugging of

2415-402: A universal Turing machine. Early computing machines had fixed programs. Changing its function required the re-wiring and re-structuring of the machine. With the proposal of the stored-program computer this changed. A stored-program computer includes by design an instruction set and can store in memory a set of instructions (a program ) that details the computation . The theoretical basis for

2520-495: A valid struct hostent * is returned. These functions are not strictly a component of the BSD socket API, but are often used in conjunction with the API functions for looking up a host. These functions are now considered legacy interfaces for querying the domain name system. New functions that are completely protocol-agnostic (supporting IPv6) have been defined. These new functions are getaddrinfo() and getnameinfo() , and are based on

2625-578: A version of the Berkeley socket interface. It became the standard interface for applications running in the Internet . Even the Winsock implementation for MS Windows, created by unaffiliated developers, closely follows the standard. The BSD sockets API is written in the C programming language . Most other programming languages provide similar interfaces, typically written as a wrapper library based on

2730-577: A wide range of tasks. The term computer system may refer to a nominally complete computer that includes the hardware , operating system , software , and peripheral equipment needed and used for full operation; or to a group of computers that are linked and function together, such as a computer network or computer cluster . A broad range of industrial and consumer products use computers as control systems , including simple special-purpose devices like microwave ovens and remote controls , and factory devices like industrial robots . Computers are at

2835-742: Is based on the Berkeley sockets API used in BSD for communications between programs. Early Microsoft operating systems, both MS-DOS and Microsoft Windows, offered limited networking capability, chiefly based on NetBIOS . In particular, Microsoft did not offer support for the TCP/IP protocol stack at that time. A number of university groups and commercial vendors, including the PC/IP group at MIT , FTP Software , Sun Microsystems , Ungermann-Bass , and Excelan , introduced TCP/IP products for MS-DOS, often as part of

2940-413: Is created with the socket() function, by specifying the desired protocol family ( PF_ -identifier) as an argument. The original design concept of the socket interface distinguished between protocol types (families) and the specific address types that each may use. It was envisioned that a protocol family may have several address types. Address types were defined by additional symbolic constants, using

3045-464: Is listening for stream-oriented connections from other hosts, it is notified of such events (cf. select() function) and must initialize the connection using function accept() . It creates a new socket for each connection and removes the connection from the listening queue. The function has the following arguments: accept() returns the new socket descriptor for the accepted connection, or the value -1 if an error occurs. All further communication with

3150-463: Is the stored program , where all the instructions for computing are stored in memory. Von Neumann acknowledged that the central concept of the modern computer was due to this paper. Turing machines are to this day a central object of study in theory of computation . Except for the limitations imposed by their finite memory stores, modern computers are said to be Turing-complete , which is to say, they have algorithm execution capability equivalent to

3255-403: Is typically set to blocking or non-blocking mode using the functions fcntl and ioctl . The operating system does not release the resources allocated to a socket until the socket is closed. This is especially important if the connect call fails and will be retried. When an application closes a socket, only the interface to the socket is destroyed. It is the kernel's responsibility to destroy

Winsock - Misplaced Pages Continue

3360-619: The Antikythera wreck off the Greek island of Antikythera , between Kythera and Crete , and has been dated to approximately c.  100 BCE . Devices of comparable complexity to the Antikythera mechanism would not reappear until the fourteenth century. Many mechanical aids to calculation and measurement were constructed for astronomical and navigation use. The planisphere was a star chart invented by Abū Rayhān al-Bīrūnī in

3465-507: The E6B circular slide rule used for time and distance calculations on light aircraft. In the 1770s, Pierre Jaquet-Droz , a Swiss watchmaker , built a mechanical doll ( automaton ) that could write holding a quill pen. By switching the number and order of its internal wheels different letters, and hence different messages, could be produced. In effect, it could be mechanically "programmed" to read instructions. Along with two other complex machines,

3570-641: The ETH Zurich . The computer was manufactured by Zuse's own company, Zuse KG , which was founded in 1941 as the first company with the sole purpose of developing computers in Berlin. The Z4 served as the inspiration for the construction of the ERMETH , the first Swiss computer and one of the first in Europe. Purely electronic circuit elements soon replaced their mechanical and electromechanical equivalents, at

3675-454: The domain name system or the local host's other resolver mechanisms (e.g., /etc/hosts lookup). They return a pointer to an object of type struct hostent , which describes an Internet Protocol host. The functions use the following arguments: The functions return a NULL pointer in case of error, in which case the external integer h_errno may be checked to see whether this is a temporary failure or an invalid or unknown host. Otherwise

3780-471: The fork system call , and reproducing such functionality in Windows was problematic. Within a relatively short time, porting gave way to the development of dedicated Windows applications. Windows 8 includes the "RIO" (Registered IO) extensions for Winsock. These extensions are designed to reduce the overhead of the user to kernel mode transition for the network data path and the notification path, but use

3885-497: The microcomputer revolution in the 1970s. The speed, power, and versatility of computers have been increasing dramatically ever since then, with transistor counts increasing at a rapid pace ( Moore's law noted that counts doubled every two years), leading to the Digital Revolution during the late 20th and early 21st centuries. Conventionally, a modern computer consists of at least one processing element , typically

3990-504: The "second generation" of computers. Compared to vacuum tubes, transistors have many advantages: they are smaller, and require less power than vacuum tubes, so give off less heat. Junction transistors were much more reliable than vacuum tubes and had longer, indefinite, service life. Transistorized computers could contain tens of thousands of binary logic circuits in a relatively compact space. However, early junction transistors were relatively bulky devices that were difficult to manufacture on

4095-525: The 1920s, Vannevar Bush and others developed mechanical differential analyzers. In the 1890s, the Spanish engineer Leonardo Torres Quevedo began to develop a series of advanced analog machines that could solve real and complex roots of polynomials , which were published in 1901 by the Paris Academy of Sciences . Charles Babbage , an English mechanical engineer and polymath , originated

4200-458: The API to comply with the regular Windows programming model. The Windows Sockets API covered almost all the features of the BSD sockets API, but there were some unavoidable obstacles which mostly arose out of fundamental differences between Windows and Unix (though Windows Sockets differed less from BSD sockets than the latter did from STREAMS ). All function calls in the API begin with the moniker WSA , e.g. WSASend() for sending data on

4305-489: The Berkeley socket API with a translation layer to a native networking API. Plan 9 and Genode use file-system APIs with control files rather than file-descriptors. The Berkeley socket interface is defined in several header files. The names and content of these files differ slightly between implementations. In general, they include: The Berkeley socket API typically provides the following functions: The function socket() creates an endpoint for communication and returns

Winsock - Misplaced Pages Continue

4410-547: The C API. As the Berkeley socket API evolved and ultimately yielded the POSIX socket API, certain functions were deprecated or removed and replaced by others. The POSIX API is also designed to be reentrant and supports IPv6. The STREAMS -based Transport Layer Interface (TLI) API offers an alternative to the socket API. Many systems that provide the TLI API also provide the Berkeley socket API. Non-Unix systems often expose

4515-619: The Cambridge EDSAC of 1949, became operational in April 1951 and ran the world's first routine office computer job . The concept of a field-effect transistor was proposed by Julius Edgar Lilienfeld in 1925. John Bardeen and Walter Brattain , while working under William Shockley at Bell Labs , built the first working transistor , the point-contact transistor , in 1947, which was followed by Shockley's bipolar junction transistor in 1948. From 1955 onwards, transistors replaced vacuum tubes in computer designs, giving rise to

4620-591: The EDVAC in 1945. The Manchester Baby was the world's first stored-program computer . It was built at the University of Manchester in England by Frederic C. Williams , Tom Kilburn and Geoff Tootill , and ran its first program on 21 June 1948. It was designed as a testbed for the Williams tube , the first random-access digital storage device. Although the computer was described as "small and primitive" by

4725-455: The ENIAC were six women, often known collectively as the "ENIAC girls". It combined the high speed of electronics with the ability to be programmed for many complex problems. It could add or subtract 5000 times a second, a thousand times faster than any other machine. It also had modules to multiply, divide, and square root. High speed memory was limited to 20 words (about 80 bytes). Built under

4830-531: The MOS transistor, was invented at Bell Labs between 1955 and 1960 and was the first truly compact transistor that could be miniaturized and mass-produced for a wide range of uses. With its high scalability , and much lower power consumption and higher density than bipolar junction transistors, the MOSFET made it possible to build high-density integrated circuits . In addition to data processing, it also enabled

4935-455: The Scottish scientist Sir William Thomson in 1872 was of great utility to navigation in shallow waters. It used a system of pulleys and wires to automatically calculate predicted tide levels for a set period at a particular location. The differential analyser , a mechanical analog computer designed to solve differential equations by integration , used wheel-and-disc mechanisms to perform

5040-493: The U.S. Although the ENIAC was similar to the Colossus, it was much faster, more flexible, and it was Turing-complete. Like the Colossus, a "program" on the ENIAC was defined by the states of its patch cables and switches, a far cry from the stored program electronic machines that came later. Once a program was written, it had to be mechanically set into the machine with manual resetting of plugs and switches. The programmers of

5145-586: The US, John Vincent Atanasoff and Clifford E. Berry of Iowa State University developed and tested the Atanasoff–Berry Computer (ABC) in 1942, the first "automatic electronic digital computer". This design was also all-electronic and used about 300 vacuum tubes, with capacitors fixed in a mechanically rotating drum for memory. During World War II, the British code-breakers at Bletchley Park achieved

5250-608: The Windows Sockets API version 2.0 are functions to use IPX/SPX , although the protocol was all but obsolete already at the time WSA 2.0 shipped. Microsoft has shipped the TCP/IP protocol stack with all recent versions of Windows, and there are no significant independent alternatives. Nor has there been significant interest in implementing protocols other than TCP/IP. Windows Sockets code and design are based on BSD sockets , but provides additional functionality to allow

5355-898: The advent of the integrated circuit (IC). The idea of the integrated circuit was first conceived by a radar scientist working for the Royal Radar Establishment of the Ministry of Defence , Geoffrey W.A. Dummer . Dummer presented the first public description of an integrated circuit at the Symposium on Progress in Quality Electronic Components in Washington, D.C. , on 7 May 1952. The first working ICs were invented by Jack Kilby at Texas Instruments and Robert Noyce at Fairchild Semiconductor . Kilby recorded his initial ideas concerning

SECTION 50

#1732802318895

5460-647: The basic concept which underlies all electronic digital computers. By 1938, the United States Navy had developed an electromechanical analog computer small enough to use aboard a submarine . This was the Torpedo Data Computer , which used trigonometry to solve the problem of firing a torpedo at a moving target. During World War II similar devices were developed in other countries as well. Early digital computers were electromechanical ; electric switches drove mechanical relays to perform

5565-530: The best Arithmetician that euer [ sic ] breathed, and he reduceth thy dayes into a short number." This usage of the term referred to a human computer , a person who carried out calculations or computations . The word continued to have the same meaning until the middle of the 20th century. During the latter part of this period, women were often hired as computers because they could be paid less than their male counterparts. By 1943, most human computers were women. The Online Etymology Dictionary gives

5670-570: The calculation. These devices had a low operating speed and were eventually superseded by much faster all-electric computers, originally using vacuum tubes . The Z2 , created by German engineer Konrad Zuse in 1939 in Berlin , was one of the earliest examples of an electromechanical relay computer. In 1941, Zuse followed his earlier machine up with the Z3 , the world's first working electromechanical programmable , fully automatic digital computer. The Z3

5775-576: The common WSA interfaces to applications above it. Users would commonly believe that only making sure the DLL file was present on a system would provide full TCP/IP protocol support. The Windows Sockets API specification defines two interfaces: the API used by application developers, and the SPI , which provides a means for network software developers to add new protocol modules to the system. Each interface represents

5880-565: The concept of a programmable computer. Considered the " father of the computer ", he conceptualized and invented the first mechanical computer in the early 19th century. After working on his difference engine he announced his invention in 1822, in a paper to the Royal Astronomical Society , titled "Note on the application of machinery to the computation of astronomical and mathematical tables". He also designed to aid in navigational calculations, in 1833 he realized that

5985-649: The core of general-purpose devices such as personal computers and mobile devices such as smartphones . Computers power the Internet , which links billions of computers and users. Early computers were meant to be used only for calculations. Simple manual instruments like the abacus have aided people in doing calculations since ancient times. Early in the Industrial Revolution , some mechanical devices were built to automate long, tedious tasks, such as guiding patterns for looms . More sophisticated electrical machines did specialized analog calculations in

6090-499: The data signals do not have to travel long distances. Since ENIAC in 1945, computers have advanced enormously, with modern SoCs (such as the Snapdragon 865) being the size of a coin while also being hundreds of thousands of times more powerful than ENIAC, integrating billions of transistors, and consuming only a few watts of power. The first mobile computers were heavy and ran from mains power. The 50 lb (23 kg) IBM 5100

6195-515: The decision of the British Government to cease funding. Babbage's failure to complete the analytical engine can be chiefly attributed to political and financial difficulties as well as his desire to develop an increasingly sophisticated computer and to move ahead faster than anyone else could follow. Nevertheless, his son, Henry Babbage , completed a simplified version of the analytical engine's computing unit (the mill ) in 1888. He gave

6300-460: The direction of John Mauchly and J. Presper Eckert at the University of Pennsylvania, ENIAC's development and construction lasted from 1943 to full operation at the end of 1945. The machine was huge, weighing 30 tons, using 200 kilowatts of electric power and contained over 18,000 vacuum tubes, 1,500 relays, and hundreds of thousands of resistors, capacitors, and inductors. The principle of

6405-483: The doll is at the Musée d'Art et d'Histoire of Neuchâtel , Switzerland , and still operates. In 1831–1835, mathematician and engineer Giovanni Plana devised a Perpetual Calendar machine , which through a system of pulleys and cylinders could predict the perpetual calendar for every year from 0 CE (that is, 1 BCE) to 4000 CE, keeping track of leap years and varying day length. The tide-predicting machine invented by

SECTION 60

#1732802318895

6510-481: The early 11th century. The astrolabe was invented in the Hellenistic world in either the 1st or 2nd centuries BCE and is often attributed to Hipparchus . A combination of the planisphere and dioptra , the astrolabe was effectively an analog computer capable of working out several different kinds of problems in spherical astronomy . An astrolabe incorporating a mechanical calendar computer and gear -wheels

6615-425: The early 2000s. These smartphones and tablets run on a variety of operating systems and recently became the dominant computing device on the market. These are powered by System on a Chip (SoCs), which are complete computers on a microchip the size of a coin. Computers can be classified in a number of different ways, including: Berkeley sockets A socket is an abstract representation ( handle ) for

6720-399: The early 20th century. The first digital electronic calculating machines were developed during World War II , both electromechanical and using thermionic valves . The first semiconductor transistors in the late 1940s were followed by the silicon -based MOSFET (MOS transistor) and monolithic integrated circuit chip technologies in the late 1950s, leading to the microprocessor and

6825-644: The error code: 0 represents success, while –1 represents an error. Historically, in BSD-derived systems, the state of a socket descriptor is undefined if the call to connect fails (as it is specified in the Single Unix Specification), thus, portable applications should close the socket descriptor immediately and obtain a new descriptor with socket(), in the case the call to connect() fails. The functions gethostbyname() and gethostbyaddr() are used to resolve host names and addresses in

6930-477: The exact definition of the term "microprocessor", it is largely undisputed that the first single-chip microprocessor was the Intel 4004 , designed and realized by Federico Faggin with his silicon-gate MOS IC technology, along with Ted Hoff , Masatoshi Shima and Stanley Mazor at Intel . In the early 1970s, MOS IC technology enabled the integration of more than 10,000 transistors on a single chip. System on

7035-519: The fact that end users were wary of getting locked into a single vendor and it became clear that some standardization was needed. The Windows Sockets project had its origins in a Birds Of A Feather session held at Interop '91 in San Jose on October 10, 1991. It is based on socket specifications created by NetManage and which it put into public domain at this meeting. At the time the NetManage socket

7140-508: The first Colossus. After a functional test in December 1943, Colossus was shipped to Bletchley Park, where it was delivered on 18 January 1944 and attacked its first message on 5 February. Colossus was the world's first electronic digital programmable computer. It used a large number of valves (vacuum tubes). It had paper-tape input and was capable of being configured to perform a variety of boolean logical operations on its data, but it

7245-725: The first attested use of computer in the 1640s, meaning 'one who calculates'; this is an "agent noun from compute (v.)". The Online Etymology Dictionary states that the use of the term to mean " 'calculating machine' (of any type) is from 1897." The Online Etymology Dictionary indicates that the "modern use" of the term, to mean 'programmable digital electronic computer' dates from "1945 under this name; [in a] theoretical [sense] from 1937, as Turing machine ". The name has remained, although modern computers are capable of many higher-level functions. Devices have been used to aid computation for thousands of years, mostly using one-to-one correspondence with fingers . The earliest counting device

7350-527: The first implementation in the Berkeley Software Distribution . Berkeley sockets originated with the 4.2BSD Unix operating system , released in 1983, as a programming interface. Not until 1989, however, could the University of California, Berkeley release versions of the operating system and networking library free from the licensing constraints of AT&T Corporation 's proprietary Unix. All modern operating systems implement

7455-453: The following steps: The User Datagram Protocol (UDP) is a connectionless protocol with no guarantee of delivery. UDP packets may arrive out of order, multiple times, or not at all. Because of this minimal design, UDP has considerably less overhead than TCP. Being connectionless means that there is no concept of a stream or permanent connection between two hosts. Such data are referred to as datagrams ( datagram sockets ). UDP address space,

7560-409: The form of conditional branching and loops , and integrated memory , making it the first design for a general-purpose computer that could be described in modern terms as Turing-complete . The machine was about a century ahead of its time. All the parts for his machine had to be made by hand – this was a major problem for a device with thousands of parts. Eventually, the project was dissolved with

7665-466: The integrated circuit in July 1958, successfully demonstrating the first working integrated example on 12 September 1958. In his patent application of 6 February 1959, Kilby described his new device as "a body of semiconductor material ... wherein all the components of the electronic circuit are completely integrated". However, Kilby's invention was a hybrid integrated circuit (hybrid IC), rather than

7770-411: The integration. In 1876, Sir William Thomson had already discussed the possible construction of such calculators, but he had been stymied by the limited output torque of the ball-and-disk integrators . In a differential analyzer, the output of one integrator drove the input of the next integrator, or a graphing output. The torque amplifier was the advance that allowed these machines to work. Starting in

7875-591: The local endpoint of a network communication path. The Berkeley sockets API represents it as a file descriptor ( file handle ) in the Unix philosophy that provides a common interface for input and output to streams of data. Berkeley sockets evolved with little modification from a de facto standard into a component of the POSIX specification. The term POSIX sockets is essentially synonymous with Berkeley sockets , but they are also known as BSD sockets , acknowledging

7980-590: The machine did make use of valves to generate its 125 kHz clock waveforms and in the circuitry to read and write on its magnetic drum memory , so it was not the first completely transistorized computer. That distinction goes to the Harwell CADET of 1955, built by the electronics division of the Atomic Energy Research Establishment at Harwell . The metal–oxide–silicon field-effect transistor (MOSFET), also known as

8085-444: The many options for lookup by these functions and its use can be disabled even today. The Berkeley socket API is a general interface for networking and interprocess communication, and supports the use of various network protocols and address architectures. The following lists a sampling of protocol families (preceded by the standard symbolic identifier) defined in a modern Linux or BSD implementation: A socket for communications

8190-452: The modern computer was proposed by Alan Turing in his seminal 1936 paper, On Computable Numbers . Turing proposed a simple device that he called "Universal Computing machine" and that is now known as a universal Turing machine . He proved that such a machine is capable of computing anything that is computable by executing instructions (program) stored on tape, allowing the machine to be programmable. The fundamental concept of Turing's design

8295-403: The more famous Sir William Thomson. The art of mechanical analog computing reached its zenith with the differential analyzer , built by H. L. Hazen and Vannevar Bush at MIT starting in 1927. This built on the mechanical integrators of James Thomson and the torque amplifiers invented by H. W. Nieman. A dozen of these devices were built before their obsolescence became obvious. By the 1950s,

8400-486: The practical use of MOS transistors as memory cell storage elements, leading to the development of MOS semiconductor memory , which replaced earlier magnetic-core memory in computers. The MOSFET led to the microcomputer revolution , and became the driving force behind the computer revolution . The MOSFET is the most widely used transistor in computers, and is the fundamental building block of digital electronics . The next great advance in computing power came with

8505-460: The prefix AF instead of PF . The AF -identifiers are intended for all data structures that specifically deal with the address type and not the protocol family. However, this concept of separation of protocol and address type has not found implementation support and the AF -constants were defined by the corresponding protocol identifier, leaving the distinction between AF and PF constants as

8610-482: The protocol stack. Raw sockets are used by some services, such as ICMP , that operate at the Internet Layer of the TCP/IP model. Berkeley sockets can operate in one of two modes: blocking or non-blocking. A blocking socket does not return control until it has sent (or received) some or all data specified for the operation. It is normal for a blocking socket not to send all data. The application must check

8715-409: The remote host now occurs via this new socket. Datagram sockets do not require processing by accept() since the receiver may immediately respond to the request using the listening socket. connect() establishes a direct communication link to a specific remote host identified by its address via a socket, identified by its file descriptor. When using a connection-oriented protocol, this establishes

8820-493: The rest of the regular Windows TCP and UDP stack (and uses existing network cards). The setup path (for example, the "connect" function) is unchanged from the regular Winsock path. Computer A computer is a machine that can be programmed to automatically carry out sequences of arithmetic or logical operations ( computation ). Modern digital electronic computers can perform generic sets of operations known as programs . These programs enable computers to perform

8925-548: The results of operations to be saved and retrieved. It was not until the mid-20th century that the word acquired its modern definition; according to the Oxford English Dictionary , the first known use of the word computer was in a different sense, in a 1613 book called The Yong Mans Gleanings by the English writer Richard Brathwait : "I haue [ sic ] read the truest computer of Times, and

9030-563: The return value to determine how many bytes have been sent or received and it must resend any data not already processed. When using blocking sockets, special consideration should be given to accept() as it may still block after indicating readability if a client disconnects during the connection phase. A non-blocking socket returns whatever is in the receive buffer and immediately continues. If not written correctly, programs using non-blocking sockets are particularly susceptible to race conditions due to variances in network link speed. A socket

9135-479: The same errno variable to record both networking errors and errors detected within standard C library functions. Since this was not possible in Windows, Windows Sockets introduced a dedicated function, WSAGetLastError() , to retrieve error information. Such mechanisms were helpful, but application porting remained extremely complex. Many original TCP/IP applications had been implemented by using system features specific to Unix , such as pseudo terminals and

9240-591: The same time that digital calculation replaced analog. The engineer Tommy Flowers , working at the Post Office Research Station in London in the 1930s, began to explore the possible use of electronics for the telephone exchange . Experimental equipment that he built in 1934 went into operation five years later, converting a portion of the telephone exchange network into an electronic data processing system, using thousands of vacuum tubes . In

9345-484: The socket internally. Sometimes, a socket may enter a TIME_WAIT state, on the server side, for up to 4 minutes. On SVR4 systems, use of close() may discard data. The use of shutdown() or SO_LINGER may be required on these systems to guarantee delivery of all data. The Transmission Control Protocol (TCP) is a connection-oriented protocol that provides a variety of error correction and performance features for transmission of byte streams. A process creates

9450-543: The space of UDP port numbers (in ISO terminology, the TSAPs ), is completely disjoint from that of TCP ports. An application may set up a UDP server on port number 7654 as follows. The programs contains an infinite loop that receives UDP datagrams with function recvfrom() . The following is a client program for sending a UDP packet containing the string "Hello World!" to address 127.0.0.1 at port number 7654. In this code, buffer

9555-490: The stored-program computer was laid out by Alan Turing in his 1936 paper. In 1945, Turing joined the National Physical Laboratory and began work on developing an electronic stored-program digital computer. His 1945 report "Proposed Electronic Calculator" was the first specification for such a device. John von Neumann at the University of Pennsylvania also circulated his First Draft of a Report on

9660-443: The success of digital electronic computers had spelled the end for most analog computing machines, but analog computers remained in use during the 1950s in some specialized applications such as education ( slide rule ) and aircraft ( control systems ). Claude Shannon 's 1937 master's thesis laid the foundations of digital computing, with his insight of applying Boolean algebra to the analysis and synthesis of switching circuits being

9765-412: The versatility and accuracy of modern digital computers. The first modern analog computer was a tide-predicting machine , invented by Sir William Thomson (later to become Lord Kelvin) in 1872. The differential analyser , a mechanical analog computer designed to solve differential equations by integration using wheel-and-disc mechanisms, was conceptualized in 1876 by James Thomson , the elder brother of

9870-406: Was a 16-transistor chip built by Fred Heiman and Steven Hofstein at RCA in 1962. General Microelectronics later introduced the first commercial MOS IC in 1964, developed by Robert Norman. Following the development of the self-aligned gate (silicon-gate) MOS transistor by Robert Kerwin, Donald Klein and John Sarace at Bell Labs in 1967, the first silicon-gate MOS IC with self-aligned gates

9975-625: Was an early example. Later portables such as the Osborne 1 and Compaq Portable were considerably lighter but still needed to be plugged in. The first laptops, such as the Grid Compass , removed this requirement by incorporating batteries – and with the continued miniaturization of computing resources and advancements in portable battery life, portable computers grew in popularity in the 2000s. The same developments allowed manufacturers to integrate computing resources into cellular mobile phones by

10080-537: Was built with 2000 relays , implementing a 22 bit word length that operated at a clock frequency of about 5–10 Hz . Program code was supplied on punched film while data could be stored in 64 words of memory or supplied from the keyboard. It was quite similar to modern machines in some respects, pioneering numerous advances such as floating-point numbers . Rather than the harder-to-implement decimal system (used in Charles Babbage 's earlier design), using

10185-511: Was delivered to the University of Manchester in February 1951. At least seven of these later machines were delivered between 1953 and 1957, one of them to Shell labs in Amsterdam . In October 1947 the directors of British catering company J. Lyons & Company decided to take an active role in promoting the commercial development of computers. Lyons's LEO I computer, modelled closely on

10290-443: Was developed by Federico Faggin at Fairchild Semiconductor in 1968. The MOSFET has since become the most critical device component in modern ICs. The development of the MOS integrated circuit led to the invention of the microprocessor , and heralded an explosion in the commercial and personal use of computers. While the subject of exactly which device was the first microprocessor is contentious, partly due to lack of agreement on

10395-825: Was developed in the late 16th century and found application in gunnery, surveying and navigation. The planimeter was a manual instrument to calculate the area of a closed figure by tracing over it with a mechanical linkage. The slide rule was invented around 1620–1630, by the English clergyman William Oughtred , shortly after the publication of the concept of the logarithm . It is a hand-operated analog computer for doing multiplication and division. As slide rule development progressed, added scales provided reciprocals, squares and square roots, cubes and cube roots, as well as transcendental functions such as logarithms and exponentials, circular and hyperbolic trigonometry and other functions . Slide rules with special scales are still used for quick performance of routine calculations, such as

10500-531: Was given to working through the IETF or establishing a non-profit foundation. In the end, it was decided that the specification would simply be copyrighted by the five authors as (unaffiliated) individuals. All the participating developers resisted the shortening of the name to simple Winsock for a long time, since there was much confusion among users between the API and the DLL library file (winsock.dll) which only exposed

10605-449: Was invented by Abi Bakr of Isfahan , Persia in 1235. Abū Rayhān al-Bīrūnī invented the first mechanical geared lunisolar calendar astrolabe, an early fixed- wired knowledge processing machine with a gear train and gear-wheels, c.  1000 AD . The sector , a calculating instrument used for solving problems in proportion, trigonometry , multiplication and division, and for various functions, such as squares and cube roots,

10710-477: Was made of germanium . Noyce's monolithic IC was fabricated using the planar process , developed by his colleague Jean Hoerni in early 1959. In turn, the planar process was based on Carl Frosch and Lincoln Derick work on semiconductor surface passivation by silicon dioxide. Modern monolithic ICs are predominantly MOS ( metal–oxide–semiconductor ) integrated circuits, built from MOSFETs (MOS transistors). The earliest experimental MOS IC to be fabricated

10815-643: Was most likely a form of tally stick . Later record keeping aids throughout the Fertile Crescent included calculi (clay spheres, cones, etc.) which represented counts of items, likely livestock or grains, sealed in hollow unbaked clay containers. The use of counting rods is one example. The abacus was initially used for arithmetic tasks. The Roman abacus was developed from devices used in Babylonia as early as 2400 BCE. Since then, many other forms of reckoning boards or tables have been invented. In

10920-434: Was not Turing-complete. Nine Mk II Colossi were built (The Mk I was converted to a Mk II making ten machines in total). Colossus Mark I contained 1,500 thermionic valves (tubes), but Mark II with 2,400 valves, was both five times faster and simpler to operate than Mark I, greatly speeding the decoding process. The ENIAC (Electronic Numerical Integrator and Computer) was the first electronic programmable computer built in

11025-510: Was the only 100% DLL based, multi-threaded product for Windows 3.0 available. The first edition of the specification was authored by Martin Hall, Mark Towfiq of Microdyne (later Sun Microsystems ), Geoff Arnold of Sun Microsystems , and Henry Sanders and J Allard of Microsoft , with assistance from many others. There was some discussion about how best to address the copyright, intellectual property, and potential anti-trust issues, and consideration

#894105