This commit is contained in:
Xing Xing 2013-12-23 17:05:42 +08:00
parent 2b4cc002d1
commit 2ee2be0891
4 changed files with 20 additions and 21 deletions

View File

@ -7,8 +7,8 @@ package worker
import ( import (
"bytes" "bytes"
"fmt"
"encoding/binary" "encoding/binary"
"fmt"
"strconv" "strconv"
) )
@ -70,7 +70,6 @@ func (inpack *inPack) UpdateStatus(numerator, denominator int) {
inpack.a.write(outpack) inpack.a.write(outpack)
} }
// Decode job from byte slice // Decode job from byte slice
func decodeInPack(data []byte) (inpack *inPack, l int, err error) { func decodeInPack(data []byte) (inpack *inPack, l int, err error) {
if len(data) < MIN_PACKET_LEN { // valid package should not less 12 bytes if len(data) < MIN_PACKET_LEN { // valid package should not less 12 bytes

View File

@ -5,10 +5,10 @@
package worker package worker
import ( import (
"fmt"
"time"
"sync"
"encoding/binary" "encoding/binary"
"fmt"
"sync"
"time"
) )
const ( const (