Tài liệu Network programming

Thảo luận trong 'Căn Bản' bắt đầu bởi Thúy Viết Bài, 5/12/13.

  1. Thúy Viết Bài

    Thành viên vàng

    Bài viết:
    198,891
    Được thích:
    167
    Điểm thành tích:
    0
    Xu:
    0Xu
    Socket Basics
    -A socket is a connection between two hosts. It can perform seven basic operations:
    -Connect to a remote machine
    -Send data
    -Receive data
    -Close a connection
    -Bind to a port
    -Listen for incoming data
    -Accept connections from remote machines on the bound port
    -Java's Socket class, which is used by both clients and servers, has methods that correspond to the first four of these operations. The last three operations are needed only by servers, which wait for clients to connect to them. They are implemented by the ServerSocket class
     

    Các file đính kèm:

Đang tải...