This commit is contained in:
raz-varren
2016-08-12 18:29:47 +00:00
parent 34f91b9914
commit 1ee09caef3
10 changed files with 35 additions and 37 deletions

View File

@@ -1,8 +1,8 @@
package ssgrpc package ssgrpc
import ( import (
"google.golang.org/grpc"
"github.com/raz-varren/sacrificial-socket/backend/ssgrpc/transport" "github.com/raz-varren/sacrificial-socket/backend/ssgrpc/transport"
"google.golang.org/grpc"
//"sync" //"sync"
) )

View File

@@ -1,9 +1,9 @@
package ssgrpc package ssgrpc
import ( import (
"golang.org/x/net/context"
"github.com/raz-varren/sacrificial-socket/backend/ssgrpc/token" "github.com/raz-varren/sacrificial-socket/backend/ssgrpc/token"
"github.com/raz-varren/sacrificial-socket/log" "github.com/raz-varren/sacrificial-socket/log"
"golang.org/x/net/context"
"sync" "sync"
"time" "time"
) )

View File

@@ -3,12 +3,12 @@ package ssgrpc
import ( import (
"encoding/json" "encoding/json"
"errors" "errors"
"golang.org/x/net/context"
"google.golang.org/grpc/metadata"
ss "github.com/raz-varren/sacrificial-socket" ss "github.com/raz-varren/sacrificial-socket"
"github.com/raz-varren/sacrificial-socket/backend/ssgrpc/token" "github.com/raz-varren/sacrificial-socket/backend/ssgrpc/token"
"github.com/raz-varren/sacrificial-socket/backend/ssgrpc/transport" "github.com/raz-varren/sacrificial-socket/backend/ssgrpc/transport"
"github.com/raz-varren/sacrificial-socket/log" "github.com/raz-varren/sacrificial-socket/log"
"golang.org/x/net/context"
"google.golang.org/grpc/metadata"
"strings" "strings"
"sync" "sync"
) )

View File

@@ -2,13 +2,13 @@ package ssgrpc
import ( import (
"encoding/json" "encoding/json"
ss "github.com/raz-varren/sacrificial-socket"
"github.com/raz-varren/sacrificial-socket/backend/ssgrpc/transport"
"github.com/raz-varren/sacrificial-socket/log"
"golang.org/x/net/context" "golang.org/x/net/context"
"google.golang.org/grpc" "google.golang.org/grpc"
"google.golang.org/grpc/credentials" "google.golang.org/grpc/credentials"
"net" "net"
ss "github.com/raz-varren/sacrificial-socket"
"github.com/raz-varren/sacrificial-socket/backend/ssgrpc/transport"
"github.com/raz-varren/sacrificial-socket/log"
"strings" "strings"
"sync" "sync"
"time" "time"

View File

@@ -2,11 +2,11 @@ package ssmongo
import ( import (
"encoding/json" "encoding/json"
ss "github.com/raz-varren/sacrificial-socket"
"github.com/raz-varren/sacrificial-socket/log"
"gopkg.in/mgo.v2" "gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson" "gopkg.in/mgo.v2/bson"
"io" "io"
ss "github.com/raz-varren/sacrificial-socket"
"github.com/raz-varren/sacrificial-socket/log"
"sync" "sync"
"time" "time"
) )

View File

@@ -3,11 +3,11 @@ package main
import ( import (
"encoding/json" "encoding/json"
"flag" "flag"
"github.com/raz-varren/sacrificial-socket"
"github.com/raz-varren/sacrificial-socket/backend/ssgrpc"
"log" "log"
"net/http" "net/http"
"os" "os"
"github.com/raz-varren/sacrificial-socket"
"github.com/raz-varren/sacrificial-socket/backend/ssgrpc"
"strings" "strings"
//"time" //"time"
) )
@@ -141,7 +141,6 @@ func RoomcastJSON(s *ss.Socket, data []byte) {
s.Roomcast(r.Room, "roomcastjson", r) s.Roomcast(r.Room, "roomcastjson", r)
} }
func Broadcast(s *ss.Socket, data []byte) { func Broadcast(s *ss.Socket, data []byte) {
s.Broadcast("broadcast", string(data)) s.Broadcast("broadcast", string(data))
} }

View File

@@ -2,9 +2,9 @@ package main
import ( import (
"encoding/json" "encoding/json"
ss "github.com/raz-varren/sacrificial-socket"
"log" "log"
"net/http" "net/http"
ss "github.com/raz-varren/sacrificial-socket"
) )
func main() { func main() {

View File

@@ -8,12 +8,12 @@ Sacrificial-Socket also has a MultihomeBackend interface for syncronizing broadc
package ss package ss
import ( import (
"github.com/raz-varren/sacrificial-socket/log"
"golang.org/x/net/websocket" "golang.org/x/net/websocket"
"io" "io"
"net/http" "net/http"
"os" "os"
"os/signal" "os/signal"
"github.com/raz-varren/sacrificial-socket/log"
"sync" "sync"
"syscall" "syscall"
) )
@@ -158,7 +158,6 @@ func (serv *SocketServer) loop(ws *websocket.Conn) {
return return
} }
eventName := "" eventName := ""
contentIdx := 0 contentIdx := 0

View File

@@ -2,10 +2,10 @@ package ss_test
import ( import (
"encoding/json" "encoding/json"
"github.com/raz-varren/sacrificial-socket"
"log" "log"
"net/http" "net/http"
"os" "os"
"github.com/raz-varren/sacrificial-socket"
) )
func ExampleNewServer() { func ExampleNewServer() {

View File

@@ -3,9 +3,9 @@ package ss
import ( import (
"bytes" "bytes"
"encoding/json" "encoding/json"
"golang.org/x/net/websocket"
"github.com/raz-varren/sacrificial-socket/log" "github.com/raz-varren/sacrificial-socket/log"
"github.com/raz-varren/sacrificial-socket/tools" "github.com/raz-varren/sacrificial-socket/tools"
"golang.org/x/net/websocket"
"sync" "sync"
) )