You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: ServerSocketClient.go
    path of file: ./repos/gonet/network
    
    the code of the file until where you have to start completion: package network

import (
	"fmt"
	"gonet/base"
	"gonet/rpc"
	"hash/crc32"
	"io"
	"log"
	"sync/atomic"
)

const (
	IDLE_TIMEOUT    = iota
	CONNECT_TIMEOUT = 
    
func (s *ServerSocketClient) Send(head rpc.RpcHead, packet rpc.Packet) int {
	defer func() {
		if err := recover(); err != nil {
			base.TraceCode(err)
		}
	}()

	if s.connectType == CLIENT_CONNECT { //对外链接send不阻塞
		select {
		case s.sendChan <- packet.Buff:
		default: //网络太卡,tcp send缓存满了并且发送队列也满了
			s.OnNetFail(1)
		}
	} else {
		return s.DoSend(packet.Buff)
	}
	return 0
}