public static ISocketPrefs GetDefaultPrefs()
 {
     return
         (SocketPrefs
          .NewBuilder()
          .SetIp("127.0.0.1")
          .SetMaxConnections(10)
          .SetPortNum(11001)
          .Build());
 }
Example #2
0
 protected override void Load(ContainerBuilder builder)
 {
     builder.RegisterType <TcpClient>();
     builder.Register(pr => SocketPrefs.NewBuilder()
                      .SetIp("127.0.0.1")
                      .SetMaxConnections(10)
                      .SetPortNum(11000)
                      .Build())
     .As <ISocketPrefs>();
 }