mirror of
https://github.com/ehang-io/nps.git
synced 2025-09-02 11:56:53 +00:00
style: fmt
This commit is contained in:
@@ -2,11 +2,12 @@ package mux
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/cnlh/nps/lib/pool"
|
||||
"io"
|
||||
"net"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/cnlh/nps/lib/pool"
|
||||
)
|
||||
|
||||
type conn struct {
|
||||
|
@@ -4,12 +4,13 @@ import (
|
||||
"bytes"
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"github.com/cnlh/nps/lib/pool"
|
||||
"math"
|
||||
"net"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
|
||||
"github.com/cnlh/nps/lib/pool"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -174,7 +175,7 @@ func (s *Mux) readSession() {
|
||||
case conn.getStatusCh <- struct{}{}:
|
||||
default:
|
||||
}
|
||||
conn.hasWrite --
|
||||
conn.hasWrite--
|
||||
case MUX_NEW_CONN_OK: //conn ok
|
||||
conn.connStatusOkCh <- struct{}{}
|
||||
case MUX_NEW_CONN_Fail:
|
||||
|
@@ -1,15 +1,16 @@
|
||||
package mux
|
||||
|
||||
import (
|
||||
"github.com/cnlh/nps/lib/common"
|
||||
"github.com/cnlh/nps/lib/pool"
|
||||
"github.com/astaxie/beego/logs"
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
_ "net/http/pprof"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/logs"
|
||||
"github.com/cnlh/nps/lib/common"
|
||||
"github.com/cnlh/nps/lib/pool"
|
||||
)
|
||||
|
||||
var conn1 net.Conn
|
||||
|
@@ -5,15 +5,16 @@ package mux
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"github.com/cnlh/nps/lib/common"
|
||||
"github.com/astaxie/beego/logs"
|
||||
"github.com/pkg/errors"
|
||||
"io"
|
||||
"net"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/logs"
|
||||
"github.com/cnlh/nps/lib/common"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@@ -1,9 +1,10 @@
|
||||
package mux
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/logs"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/logs"
|
||||
)
|
||||
|
||||
func TestPortMux_Close(t *testing.T) {
|
||||
@@ -11,7 +12,7 @@ func TestPortMux_Close(t *testing.T) {
|
||||
logs.EnableFuncCallDepth(true)
|
||||
logs.SetLogFuncCallDepth(3)
|
||||
|
||||
pMux := NewPortMux(8888,"Ds")
|
||||
pMux := NewPortMux(8888, "Ds")
|
||||
go func() {
|
||||
if pMux.Start() != nil {
|
||||
logs.Warn("Error")
|
||||
|
@@ -2,8 +2,9 @@ package mux
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/cnlh/nps/lib/pool"
|
||||
"sync"
|
||||
|
||||
"github.com/cnlh/nps/lib/pool"
|
||||
)
|
||||
|
||||
type Element *bufNode
|
||||
|
Reference in New Issue
Block a user