<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
	<id>https://skillset.wiki/index.php?action=history&amp;feed=atom&amp;title=ServerSocket</id>
	<title>ServerSocket - 版の履歴</title>
	<link rel="self" type="application/atom+xml" href="https://skillset.wiki/index.php?action=history&amp;feed=atom&amp;title=ServerSocket"/>
	<link rel="alternate" type="text/html" href="https://skillset.wiki/index.php?title=ServerSocket&amp;action=history"/>
	<updated>2026-04-29T05:52:45Z</updated>
	<subtitle>このウィキのこのページに関する変更履歴</subtitle>
	<generator>MediaWiki 1.42.5</generator>
	<entry>
		<id>https://skillset.wiki/index.php?title=ServerSocket&amp;diff=4628&amp;oldid=prev</id>
		<title>Y: /* 例 */</title>
		<link rel="alternate" type="text/html" href="https://skillset.wiki/index.php?title=ServerSocket&amp;diff=4628&amp;oldid=prev"/>
		<updated>2019-07-03T00:17:38Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;例&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ja&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 古い版&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2019年7月3日 (水) 09:17時点における版&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l12&quot;&gt;12行目:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;12行目:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  System.out.println(&amp;quot;Hello!&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  System.out.println(&amp;quot;Hello!&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ServerSocket ss = new ServerSocket(39648);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ServerSocket ss = new ServerSocket(39648);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  Socket &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;s &lt;/del&gt;= ss.accept();&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  Socket &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;skt &lt;/ins&gt;= ss.accept();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  System.out.println(&quot;Connecting from &quot; + &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;s&lt;/del&gt;.getInetAddress());&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  System.out.println(&quot;Connecting from &quot; + &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;skt&lt;/ins&gt;.getInetAddress());&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;s&lt;/del&gt;.getOutputStream().write(&quot;WELCOME&quot;.getBytes());&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;skt&lt;/ins&gt;.getOutputStream().write(&quot;WELCOME&quot;.getBytes());&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;s&lt;/del&gt;.getOutputStream().flush();&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;skt&lt;/ins&gt;.getOutputStream().flush();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;s&lt;/del&gt;.close();&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;skt&lt;/ins&gt;.close();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Y</name></author>
	</entry>
	<entry>
		<id>https://skillset.wiki/index.php?title=ServerSocket&amp;diff=3721&amp;oldid=prev</id>
		<title>Y: ページの作成:「java.net.ServerSocket [https://docs.oracle.com/javase/jp/8/docs/api/java/net/ServerSocket.html]  私はサーバ・ソケットを用意…」</title>
		<link rel="alternate" type="text/html" href="https://skillset.wiki/index.php?title=ServerSocket&amp;diff=3721&amp;oldid=prev"/>
		<updated>2019-06-27T11:42:11Z</updated>

		<summary type="html">&lt;p&gt;ページの作成:「&lt;a href=&quot;/java.net_%E3%81%AE%E3%82%AF%E3%83%A9%E3%82%B9%E3%81%9F%E3%81%A1&quot; title=&quot;java.net のクラスたち&quot;&gt;java.net&lt;/a&gt;.ServerSocket [https://docs.oracle.com/javase/jp/8/docs/api/java/net/ServerSocket.html]  私はサーバ・ソケットを用意…」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[java.net のクラスたち|java.net]].ServerSocket [https://docs.oracle.com/javase/jp/8/docs/api/java/net/ServerSocket.html]&lt;br /&gt;
&lt;br /&gt;
私はサーバ・ソケットを用意します。それから、ネットワーク経由で要求が送られてくるのを待ちます。その要求に応じていくつかの操作を実行します。場合によっては要求元に結果を返します&lt;br /&gt;
&lt;br /&gt;
==コンストラクタ==&lt;br /&gt;
* public ServerSocket(int port) - 指定ポートにサーバー・ソケットを作成&lt;br /&gt;
&lt;br /&gt;
==メソッド==&lt;br /&gt;
* accept - 接続要求を待機し、それを受け取る&lt;br /&gt;
&lt;br /&gt;
==例==&lt;br /&gt;
 System.out.println(&amp;quot;Hello!&amp;quot;);&lt;br /&gt;
 ServerSocket ss = new ServerSocket(39648);&lt;br /&gt;
 Socket s = ss.accept();&lt;br /&gt;
 System.out.println(&amp;quot;Connecting from &amp;quot; + s.getInetAddress());&lt;br /&gt;
 s.getOutputStream().write(&amp;quot;WELCOME&amp;quot;.getBytes());&lt;br /&gt;
 s.getOutputStream().flush();&lt;br /&gt;
 s.close();&lt;/div&gt;</summary>
		<author><name>Y</name></author>
	</entry>
</feed>