fix expression error in tanslated version

This commit is contained in:
hang
2016-05-18 21:18:57 +08:00
parent 0db5b743f9
commit 722c4d24dd
4 changed files with 4 additions and 4 deletions

View File

@@ -266,7 +266,7 @@ Some of you may be thinking the following: this server does not do anything mean
func handleClient(conn net.Conn) {
conn.SetReadDeadline(time.Now().Add(2 * time.Minute)) // set 2 minutes timeout
request := make([]byte, 128) // set maximum request length to 128KB to prevent flood based attacks
request := make([]byte, 128) // set maximum request length to 128B to prevent flood based attacks
defer conn.Close() // close connection before exit
for {
read_len, err := conn.Read(request)

View File

@@ -185,7 +185,7 @@ JSONの出力に対して、struct tagを定義する場合注意すべきいく
// ID はJSONの中にエクスポートされません。
ID int `json:"-"`
// ServerName の値は二次JSONエンコーディングが行われます。
// ServerName2 の値は二次JSONエンコーディングが行われます。
ServerName string `json:"serverName"`
ServerName2 string `json:"serverName2,string"`

View File

@@ -255,7 +255,7 @@ Go言語ではnetパッケージの`DialTCP`関数によってTCP接続を一つ
func handleClient(conn net.Conn) {
conn.SetReadDeadline(time.Now().Add(2 * time.Minute)) // set 2 minutes timeout
request := make([]byte, 128) // set maxium request length to 128KB to prevent flood attack
request := make([]byte, 128) // set maxium request length to 128B to prevent flood attack
defer conn.Close() // close connection before exit
for {
read_len, err := conn.Read(request)

View File

@@ -266,7 +266,7 @@ Some of you may be thinking the following: this server does not do anything mean
func handleClient(conn net.Conn) {
conn.SetReadDeadline(time.Now().Add(2 * time.Minute)) // set 2 minutes timeout
request := make([]byte, 128) // set maximum request length to 128KB to prevent flood based attacks
request := make([]byte, 128) // set maximum request length to 128B to prevent flood based attacks
defer conn.Close() // close connection before exit
for {
read_len, err := conn.Read(request)