File tree 4 files changed +4
-4
lines changed
4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -266,7 +266,7 @@ Some of you may be thinking the following: this server does not do anything mean
266
266
267
267
func handleClient(conn net.Conn) {
268
268
conn.SetReadDeadline(time.Now().Add(2 * time.Minute)) // set 2 minutes timeout
269
- request := make([]byte, 128) // set maximum request length to 128KB to prevent flood based attacks
269
+ request := make([]byte, 128) // set maximum request length to 128B to prevent flood based attacks
270
270
defer conn.Close() // close connection before exit
271
271
for {
272
272
read_len, err := conn.Read(request)
Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ JSONの出力に対して、struct tagを定義する場合注意すべきいく
185
185
// ID はJSONの中にエクスポートされません。
186
186
ID int `json:"-"`
187
187
188
- // ServerName の値は二次JSONエンコーディングが行われます。
188
+ // ServerName2 の値は二次JSONエンコーディングが行われます。
189
189
ServerName string `json:"serverName"`
190
190
ServerName2 string `json:"serverName2,string"`
191
191
Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ Go言語ではnetパッケージの`DialTCP`関数によってTCP接続を一つ
255
255
256
256
func handleClient(conn net.Conn) {
257
257
conn.SetReadDeadline(time.Now().Add(2 * time.Minute)) // set 2 minutes timeout
258
- request := make([]byte, 128) // set maxium request length to 128KB to prevent flood attack
258
+ request := make([]byte, 128) // set maxium request length to 128B to prevent flood attack
259
259
defer conn.Close() // close connection before exit
260
260
for {
261
261
read_len, err := conn.Read(request)
Original file line number Diff line number Diff line change @@ -266,7 +266,7 @@ Some of you may be thinking the following: this server does not do anything mean
266
266
267
267
func handleClient(conn net.Conn) {
268
268
conn.SetReadDeadline(time.Now().Add(2 * time.Minute)) // set 2 minutes timeout
269
- request := make([]byte, 128) // set maximum request length to 128KB to prevent flood based attacks
269
+ request := make([]byte, 128) // set maximum request length to 128B to prevent flood based attacks
270
270
defer conn.Close() // close connection before exit
271
271
for {
272
272
read_len, err := conn.Read(request)
You can’t perform that action at this time.
0 commit comments