Java TCP/IP Socket Programming (2nd Edition)
Tags
Summary
Editor's review
Who it's for
A good fit for
- 已掌握Java基础语法、想系统学网络通信的在读学生
- 需要自己实现客户端/服务器通信的初中级Java开发者
- 准备面试中TCP/UDP、I/O模型、多线程服务器等考点的求职者
- 讲授Java网络编程课程、需要短篇幅教材与练习题的高校教师
Not a good fit for
- 完全没写过Java、也不了解进程/线程概念的零基础读者
- 只想直接使用Netty等框架、不打算弄懂底层Socket机制的人
- 期待覆盖NIO.2、虚拟线程等新版本特性的读者
Reading tips
- 手边开一个IDE,把第2章的TCP/UDP示例亲手敲通,再对照抓包工具观察报文流向。
- 读第3章时重点自己设计一套协议消息格式,体会成帧与解析为何比“直接write字符串”更可靠。
- 第4、5章的多线程与Selector示例建议做压力测试,观察超时、连接数与线程数之间的关系。
- 把每章末尾的练习题当作检查清单,做完再进入下一章,避免只读不写。
About the publisher
In addition to science and technology and professional publishing, the books in our catalog from China Machine Press also reflect a sustained focus on psychology, computing, management, finance and economics, and social sciences. In psychology, the catalog includes works by C. G. Jung and introductions to analytical psychology, as well as applied topics such as stress and health, and addiction and healing. In computing, it features Structure and Interpretation of Computer Programs (JavaScript Edition). Management and finance titles include Administrative Behavior (4th Edition), The Price of Inequality (Collector's Edition), and This Time Is Different: Eight Centuries of Financial Folly (Commemorative Edition). In the philosophy and history of science, there is The Worldview: The Third Edition. Relevant authors include C. G. Jung, William McGuire, Sonu Shamdasani, and Gabor Maté. Public information is limited; the above summarizes the publisher's profile based solely on the books in our catalog.
Contents
- Translator's Preface
- Preface
- Chapter 1 Introduction
- 1.1 Computer Networks, Packets, and Protocols
- 1.2 About Addresses
- 1.3 About Names
- 1.4 Clients and Servers
- 1.5 What Is a Socket?
- 1.6 Exercises
- Chapter 2 Basic Sockets
- 2.1 Socket Addresses
- 2.2 TCP Sockets
- 2.2.1 TCP Clients
- 2.2.2 TCP Servers
- 2.2.3 Input and Output Streams
- 2.3 UDP Sockets
- 2.3.1 The DatagramPacket Class
- 2.3.2 UDP Clients
- 2.3.3 UDP Servers
- 2.3.4 Sending and Receiving with UDP Sockets
- 2.4 Exercises
- Chapter 3 Sending and Receiving Data
- 3.1 Information Encoding
- 3.1.1 Basic Integers
- 3.1.2 Strings and Text
- 3.1.3 Bit Manipulation: Encoding Booleans
- 3.2 Combining Input and Output Streams
- 3.3 Framing and Parsing
- 3.4 Java-Specific Encodings
- 3.5 Building and Parsing Protocol Messages
- 3.5.1 Text-Based Representation
- 3.5.2 Binary Representation
- 3.5.3 Sending and Receiving
- 3.6 Closing
- 3.7 Exercises
- Chapter 4 Advanced Topics
- 4.1 Multitasking
- 4.1.1 Java Multithreading
- 4.1.2 Server Protocols
- 4.1.3 Thread per Client
FAQ
这本书和《TCP/IP Sockets in Java》是同一本吗?
书里的代码对应哪个Java版本?
没有网络基础能直接读吗?
这本书讲NIO讲得深吗?
为什么这本书只有一百多页?
Comments
Find this book
This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.