<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en-us" xml:lang="en-us"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="security" content="public" /> <meta name="Robots" content="index,follow" /> <meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' /> <meta name="DC.Type" content="concept" /> <meta name="DC.Title" content="Socket programming" /> <meta name="abstract" content="A socket is a communications connection point (endpoint) that you can name and address in a network." /> <meta name="description" content="A socket is a communications connection point (endpoint) that you can name and address in a network." /> <meta name="DC.Relation" scheme="URI" content="whatnew.htm" /> <meta name="DC.Relation" scheme="URI" content="printthis.htm" /> <meta name="DC.Relation" scheme="URI" content="prerequisites.htm" /> <meta name="DC.Relation" scheme="URI" content="howdosockets.htm" /> <meta name="DC.Relation" scheme="URI" content="characteristics.htm" /> <meta name="DC.Relation" scheme="URI" content="bdesign.htm" /> <meta name="DC.Relation" scheme="URI" content="aconcepts.htm" /> <meta name="DC.Relation" scheme="URI" content="ip6scen.htm" /> <meta name="DC.Relation" scheme="URI" content="designrec.htm" /> <meta name="DC.Relation" scheme="URI" content="example.htm" /> <meta name="DC.Relation" scheme="URI" content="xsockets.htm" /> <meta name="DC.Relation" scheme="URI" content="service.htm" /> <meta name="copyright" content="(C) Copyright IBM Corporation 2001, 2006" /> <meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2001, 2006" /> <meta name="DC.Format" content="XHTML" /> <meta name="DC.Identifier" content="soxoverview" /> <meta name="DC.Language" content="en-us" /> <!-- All rights reserved. Licensed Materials Property of IBM --> <!-- US Government Users Restricted Rights --> <!-- Use, duplication or disclosure restricted by --> <!-- GSA ADP Schedule Contract with IBM Corp. --> <link rel="stylesheet" type="text/css" href="./ibmdita.css" /> <link rel="stylesheet" type="text/css" href="./ic.css" /> <title>Socket programming</title> </head> <body id="soxoverview"><a name="soxoverview"><!-- --></a> <!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script> <h1 class="topictitle1">Socket programming</h1> <div><p>A <dfn class="term">socket</dfn> is a communications connection point (endpoint) that you can name and address in a network. </p> <p>The processes that use a socket can reside on the same system or on different systems on different networks. Sockets are useful for both stand-alone and network applications. Sockets allow you to exchange information between processes on the same machine or across a network, distribute work to the most efficient machine, and they easily allow access to centralized data. Socket application program interfaces (APIs) are the network standard for TCP/IP. A wide range of operating systems support socket APIs. i5/OS™ sockets support multiple transport and networking protocols. Socket system functions and the socket network functions are threadsafe.</p> <p>Socket programming shows how to use socket APIs to establish communication links between remote and local processes. Programmers who use Integrated Language Environment<sup>®</sup> (ILE) C can use the information to develop socket applications. You can also code to the sockets API from other ILE languages, such as RPG.</p> <p>Java™ also supports a socket programming interface.</p> <div class="note"><span class="notetitle">Note:</span> By using the code examples, you agree to the terms of the <a href="codedisclaimer.htm">Code license and disclaimer information</a>.</div> </div> <div> <ul class="ullinks"> <li class="ulchildlink"><strong><a href="whatnew.htm">What's new for V5R4</a></strong><br /> This topic highlights some changes to the Socket programming for V5R4.</li> <li class="ulchildlink"><strong><a href="printthis.htm">Printable PDFs</a></strong><br /> Use this to view and print a PDF of this information.</li> <li class="ulchildlink"><strong><a href="prerequisites.htm">Prerequisites for socket programming</a></strong><br /> Before writing socket applications, you must first complete these steps.</li> <li class="ulchildlink"><strong><a href="howdosockets.htm">How sockets work</a></strong><br /> Sockets are commonly used for client/server interaction. Typical system configuration places the server on one machine, with the clients on other machines. The clients connect to the server, exchange information, and then disconnect.</li> <li class="ulchildlink"><strong><a href="characteristics.htm">Socket characteristics</a></strong><br /> Sockets share some common characteristics.</li> <li class="ulchildlink"><strong><a href="bdesign.htm">Basic socket design</a></strong><br /> This topic provides examples of sockets programs that use the most basic design.</li> <li class="ulchildlink"><strong><a href="aconcepts.htm">Advanced socket concepts</a></strong><br /> Advanced socket concepts go beyond a general discussion of what sockets are and how they work. They provide ways to design socket applications for larger and more complex networks.</li> <li class="ulchildlink"><strong><a href="ip6scen.htm">Socket scenario: Create an application to accept IPv4 and IPv6 clients</a></strong><br /> This topic describes a typical situation in which you might want to use the AF_INET6 address family.</li> <li class="ulchildlink"><strong><a href="designrec.htm">Socket application design recommendations</a></strong><br /> Before working with socket applications, assess the functional requirements, goals, and needs of the socket application.</li> <li class="ulchildlink"><strong><a href="example.htm">Examples: Socket application designs</a></strong><br /> These examples provide many sample programs that illustrate the more advanced socket concepts. You can use these sample programs to create your own applications that complete a similar task.</li> <li class="ulchildlink"><strong><a href="xsockets.htm">Xsockets tool</a></strong><br /> The Xsockets tool is one of the many tools that are shipped with the iSeries™. All tools are stored in the QUSRTOOL library. The Xsockets tool allows programmers to interactively work with socket APIs.</li> <li class="ulchildlink"><strong><a href="service.htm">Serviceability tools</a></strong><br /> As the use of sockets and secure sockets continues to grow to accommodate e-business applications and servers, the current serviceability tools need to keep up with this demand.</li> </ul> </div> </body> </html>