Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
Sockets[GetLocalHost] - ソケット接続のローカル終点のホスト名を返す
Sockets[GetLocalPort] - ソケット接続のローカル終点のポート番号を返す
Sockets[GetPeerHost] - ソケット接続のリモート終点のホスト名を返す
Sockets[GetPeerPort] - ソケット接続のリモート終点のポート番号を返す
使い方
GetLocalHost(sid)
GetLocalPort(sid)
GetPeerHost(sid)
GetPeerPort(sid)
パラメータ
sid - 開かれた接続に関する有効なソケット ID
説明
これら4つの手続きは、ソケット接続の終点に関する情報を返します。
各ルーチンは、開かれた接続に関する有効なソケットID を表す、1つの引数を必要とします。必要とする情報の種類に依存して、文字列または正の整数値のいずれかが返されます。
手続き GetLocalHost は、ソケット接続のローカル終点のホスト名を返します。一方、GetPeerHost は、接続の peer 側のホスト名を返します。それぞれの場合、ホスト名は文字列の形で返されます。
ローカルおよびリモートの終点に関するポート番号は、それぞれルーチン GetLocalPort および GetPeerPort を用いて、Maple の正の整数として得られます。
例
with( Sockets ): sid := Open( "vulcan", "echo" );
GetLocalHost( sid );
GetLocalPort( sid );
GetPeerHost( sid );
GetPeerPort( sid );
LookupService( "echo" );
Close( sid );
参照
用語集 - socket, Sockets パッケージの紹介, Sockets[LookupService]
Download Help Document