|
@@ -69,10 +69,12 @@ func Writer(d *Door) {
|
|
|
var DataWrite uint32 = uint32(0)
|
|
|
var err error
|
|
|
err = syscall.WSASend(handle, &WSA_Buffer, 1, &DataWrite, UitnZero_1, nil, nil)
|
|
|
- if err != nil {
|
|
|
- fmt.Printf("write: %d bytes, error: %#v\n", DataWrite, err)
|
|
|
- } else {
|
|
|
- log.Printf("write %d bytes\n", DataWrite)
|
|
|
+ if DEBUG_OUTPUT {
|
|
|
+ if err != nil {
|
|
|
+ fmt.Printf("write: %d bytes, error: %#v\n", DataWrite, err)
|
|
|
+ } else {
|
|
|
+ log.Printf("write %d bytes\n", DataWrite)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (err != nil) || (l != DataWrite) {
|