91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 3.1MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2023-09-21
  • 語言: 其他
  • 標簽: websocket??html5??

資源簡介

SuperWebSocket的使用示例及相關dll.

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Web;
using?System.Web.Security;
using?System.Web.SessionState;
using?SuperSocket.Common;
using?SuperSocket.Socketbase;
using?SuperSocket.Socketbase.Command;
using?SuperSocket.Socketbase.Config;
using?SuperSocket.Socketbase.Logging;
using?SuperSocket.SocketEngine;
using?SuperSocket.SocketEngine.Configuration;
using?SuperWebSocket;

namespace?ZhiFuXieHui
{
????public?class?Global?:?System.Web.HttpApplication
????{

????????private?IBootstrap?m_Bootstrap;
????????public?static?WebSocketServer?m_WebSocketServer;

????????protected?void?Application_Start(object?sender?EventArgs?e)
????????{
????????????StartSuperWebSocketByConfig();
????????}

????????void?StartSuperWebSocketByConfig()
????????{
????????????m_Bootstrap?=?BootstrapFactory.CreateBootstrap();

????????????if?(!m_Bootstrap.Initialize())
????????????????return;

????????????var?socketServer?=?m_Bootstrap.AppServers.FirstOrDefault(s?=>?s.Name.Equals(“SuperWebSocket“))?as?WebSocketServer;

????????????socketServer.NewMessageReceived?+=?new?SessionHandler(socketServer_NewMessageReceived);
????????????socketServer.NewSessionConnected?+=?socketServer_NewSessionConnected;
????????????socketServer.SessionClosed?+=?socketServer_SessionClosed;

????????????m_WebSocketServer?=?socketServer;

????????????m_Bootstrap.Start();
????????}

????????void?socketServer_NewMessageReceived(WebSocketSession?session?string?e)
????????{
????????????//SendToAll(session.Cookies[“name“]?+?“:?“?+?e);
????????}

????????void?socketServer_NewSessionConnected(WebSocketSession?session)
????????{
????????????//SendToAll(“System:?“?+?session.Cookies[“name“]?+?“?connected“);
????????}

????????void?socketServer_SessionClosed(WebSocketSession?session?CloseReason?reason)
????????{
????????????if?(reason?==?CloseReason.ServerShutdown)
????????????????return;

????????????//SendToAll(“System:?“?+?session.Cookies[“name“]?+?“?disconnected“);
????????}

????????void?SendToAll(string?message)
????????{
????????????foreach?(var?s?in?m_WebSocketServer.GetAllSessions())
????????????{
????????????????s.Send(message);
????????????}
????????}

????????void?Application_End(object?sender?EventArgs?e)
????????{
????????????if?(m_Bootstrap?!=?null)
????????????????m_Bootstrap.Stop();
????????}


????????protected?void?Session_Start(object?sender?EventArgs?e)
????????{

????????}

????????protected?void?Application_BeginRequest(object?sender?EventArgs?e)
????????{

????????}

????????protected?void?Application_AuthenticateRequest(object?sender?EventArgs?e)
????????{

????????}

????????protected?void?Application_Error(object?sender?EventArgs?e)
????????{

????????}

????????protected?void?Session_End(object?sender?EventArgs?e)
????????{

????????}

???
????}
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件?????????95??2013-06-23?16:46??SuperWebSocket(0.8)\Global.asax

?????文件???????2936??2013-06-24?09:53??SuperWebSocket(0.8)\Global.asax.cs

?????文件???????3002??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\Config\log4net.config

?????文件?????????39??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\InstallService.bat

?????文件?????286720??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\log4net.dll

?????文件?????335360??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\Newtonsoft.Json.dll

?????文件??????32768??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\SuperSocket.Common.dll

?????文件?????103936??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\SuperSocket.Common.pdb

?????文件??????56732??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\SuperSocket.Common.xml

?????文件??????16384??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\SuperSocket.Facility.dll

?????文件??????44544??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\SuperSocket.Facility.pdb

?????文件??????23709??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\SuperSocket.Facility.xml

?????文件?????102912??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\SuperSocket.Socketbase.dll

?????文件?????218624??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\SuperSocket.Socketbase.pdb

?????文件?????219469??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\SuperSocket.Socketbase.xml

?????文件??????77312??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\SuperSocket.SocketEngine.dll

?????文件?????192000??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\SuperSocket.SocketEngine.pdb

?????文件??????48901??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\SuperSocket.SocketEngine.xml

?????文件??????11776??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\SuperSocket.SocketService.exe

?????文件????????888??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\SuperSocket.SocketService.exe.config

?????文件??????26112??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\SuperSocket.SocketService.pdb

?????文件??????66560??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\SuperWebSocket.dll

?????文件?????200192??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\SuperWebSocket.pdb

?????文件?????393216??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\System.Threading.dll

?????文件?????????39??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Debug\UninstallService.bat

?????文件???????3002??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Release\Config\log4net.config

?????文件?????????39??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Release\InstallService.bat

?????文件?????286720??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Release\log4net.dll

?????文件?????335360??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Release\Newtonsoft.Json.dll

?????文件??????29696??2013-06-04?14:43??SuperWebSocket(0.8)\Net35\Release\SuperSocket.Common.dll

............此處省略134個文件信息

評論

共有 條評論