From: <Saved by Mozilla 5.0 (Windows)>
Subject: Exemplo de programa em Sockets em C usando UDP para Windows:
Date: Wed, 25 Dec 2013 15:03:06 -0200
MIME-Version: 1.0
Content-Type: text/html;
	charset="windows-1252"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.inf.pucrs.br/~cnunes/redes_si/Sockets.htm
X-MAF-Information: Produced By MAF V3.0.0

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" xmlns:w=3D"urn:sc=
hemas-microsoft-com:office:word" xmlns=3D"http://www.w3.org/TR/REC-html40">=
<head>
<meta http-equiv=3D"content-type" content=3D"text/html; charset=3Dwindows-1=
252">
<meta http-equiv=3D"content-type" content=3D"text/html; charset=3Dwindows-1=
252">
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dwindows-1=
252">
<meta name=3D"ProgId" content=3D"Word.Document">
<meta name=3D"Generator" content=3D"Microsoft Word 11">
<meta name=3D"Originator" content=3D"Microsoft Word 11">
<link rel=3D"File-List" href=3D"http://www.inf.pucrs.br/%7Ecnunes/redes_si/=
Sockets_arquivos/filelist.xml">
<title>Exemplo de programa em Sockets em C usando UDP para Windows:</title>
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Author>xxx</o:Author>
  <o:LastAuthor>GTIT</o:LastAuthor>
  <o:Revision>4</o:Revision>
  <o:TotalTime>37</o:TotalTime>
  <o:Created>2005-10-06T18:09:00Z</o:Created>
  <o:LastSaved>2007-05-30T00:50:00Z</o:LastSaved>
  <o:Pages>1</o:Pages>
  <o:Words>154</o:Words>
  <o:Characters>878</o:Characters>
  <o:Company>Home</o:Company>
  <o:Lines>7</o:Lines>
  <o:Paragraphs>2</o:Paragraphs>
  <o:CharactersWithSpaces>1030</o:CharactersWithSpaces>
  <o:Version>11.8132</o:Version>
 </o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:HyphenationZone>21</w:HyphenationZone>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState=3D"false" LatentStyleCount=3D"156">
 </w:LatentStyles>
</xml><![endif]-->
<style><!--

/* Effective stylesheet produced by snapshot save */

p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0in 0in 0.0001pt; font-s=
ize: 12pt; font-family: "Times New Roman"; }

a:link, span.MsoHyperlink { color: blue; text-decoration: underline; }

a:visited, span.MsoHyperlinkFollowed { color: purple; text-decoration: unde=
rline; }

div.Section1 { page: Section1; }

--></style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */
 table.MsoNormalTable
	{mso-style-name:"Tabela normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin:0in;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";
	mso-ansi-language:#0400;
	mso-fareast-language:#0400;
	mso-bidi-language:#0400;}
</style>
<![endif]-->
<style id=3D"nkdyehonvglc" type=3D"text/css"><!--

/* Effective stylesheet produced by snapshot save */

--></style></head>

<body style=3D"tab-interval:35.4pt" lang=3D"EN-US" link=3D"blue" vlink=3D"p=
urple">

<div class=3D"Section1">

<p class=3D"MsoNormal"><b><span style=3D"font-size:14.0pt;mso-bidi-font-siz=
e:
12.0pt;mso-ansi-language:PT" lang=3D"PT">Exemplo de programa em Sockets em=
 C usando UDP
para Windows:<o:p></o:p></span></b></p>

<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:PT" lang=3D"PT"><o:=
p>=A0</o:p></span></p>

<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:PT" lang=3D"PT">O=
 cliente se
conecta ao servidor e envia uma mensagem para ele.<o:p></o:p></span></p>

<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:PT" lang=3D"PT">Rod=
ar o
servidor_udp.exe <br>
Rodar no Prompt do DOS o: <br>
cliente_udp.exe 127.0.0.0 mensagem para ser enviada <br>
<br>
Arquivos:<o:p></o:p></span></p>

<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:PT" lang=3D"PT"><a=
 href=3D"http://www.inf.pucrs.br/%7Ecnunes/redes_si/sockets/teste_client.cp=
p">teste_client.cpp</a><o:p></o:p></span></p>

<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:PT" lang=3D"PT"><a=
 href=3D"http://www.inf.pucrs.br/%7Ecnunes/redes_si/sockets/teste_server.cp=
p">teste_server.cpp</a><o:p></o:p></span></p>

<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:PT" lang=3D"PT"><o:=
p>=A0</o:p></span></p>

<p class=3D"MsoNormal"><b><span style=3D"font-size:14.0pt;mso-bidi-font-siz=
e:
12.0pt;mso-ansi-language:PT" lang=3D"PT">Exemplo de programa em Sockets em=
 C usando UDP
para Linux:<o:p></o:p></span></b></p>

<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:PT" lang=3D"PT"><o:=
p>=A0</o:p></span></p>

<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:PT" lang=3D"PT">Par=
a compilar no
Linux:<o:p></o:p></span></p>

<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:PT" lang=3D"PT">gcc=
 <a href=3D"http://www.inf.pucrs.br/%7Ecnunes/redes_si/sockets/udpClient_Li=
nux.c">udpClient_Linux.c</a> -o cliente<o:p></o:p></span></p>

<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:PT" lang=3D"PT">gcc=
 <a href=3D"http://www.inf.pucrs.br/%7Ecnunes/redes_si/sockets/udpServer_Li=
nux.c">udpServer_Linux.c</a> -o servidor<o:p></o:p></span></p>

<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:PT" lang=3D"PT"><o:=
p>=A0</o:p></span></p>

<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:PT" lang=3D"PT">Rod=
ar o servidor.<o:p></o:p></span></p>

<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:PT" lang=3D"PT">Abr=
ir outra
janela, rodar o cliente:<o:p></o:p></span></p>

<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:PT" lang=3D"PT">cli=
ente 127.0.0.1
mensagem<o:p></o:p></span></p>

<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:PT" lang=3D"PT"><o:=
p>=A0</o:p></span></p>

<p class=3D"MsoNormal"><b><span style=3D"font-size:14.0pt;mso-bidi-font-siz=
e:
12.0pt;mso-ansi-language:PT" lang=3D"PT">Exemplo de programa em Sockets em=
 Java usando UDP:<o:p></o:p></span></b></p>

<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:PT" lang=3D"PT"><a=
 href=3D"http://www.inf.pucrs.br/%7Ecnunes/redes_si/sockets/udp_server.java=
">udp_server.java</a> - <a href=3D"http://www.inf.pucrs.br/%7Ecnunes/redes_=
si/sockets/UDPServer.class">UDPServer.class</a><o:p></o:p></span></p>

<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:PT" lang=3D"PT"><a=
 href=3D"http://www.inf.pucrs.br/%7Ecnunes/redes_si/sockets/udp_client.java=
">udp_client.java</a> - <a href=3D"http://www.inf.pucrs.br/%7Ecnunes/redes_=
si/sockets/UDPClient.class">UDPClient.class</a><o:p></o:p></span></p>

<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:PT" lang=3D"PT"><o:=
p>=A0</o:p></span></p>

<p class=3D"MsoNormal"><span style=3D"mso-ansi-language:PT" lang=3D"PT"><a=
 href=3D"http://www.inf.pucrs.br/%7Ecnunes/redes_si/envia_blocos.txt">Exemp=
lo de divis=E3o de arquivos</a><o:p></o:p></span></p>

</div>




<object style=3D"position: absolute; left: 0px; top: 0px;" type=3D"applicat=
ion/gas-events-bb" id=3D"5b9b9bb8-29d9-afbe-2aeb-1b9679959aa5" height=3D"0"=
 width=3D"0"></object></body></html>