public Connect ( string address, int port, string password ) : void | ||
address | string | |
port | int | |
password | string | |
return | void |
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); WebApiConfig.Register(GlobalConfiguration.Configuration); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); var commLayer = new CommLayer(); var commHandler = new CommHandler(commLayer); /* var blah = RoleEnvironment.GetConfigurationSettingValue("StorageConnectionString"); CloudStorageAccount storageAccount = CloudStorageAccount.Parse(blah); GlobalStaticVars.StaticRole = new Core(commHandler); ChatMessage msg = new ChatMessage(new DateTime(2012, 12, 18), "Llamautomatic", "This is a test message, generated at server-mock level"); mockServer.Raise(m => m.MessageSent += null, new ChatEventArgs(msg)); msg = new ChatMessage(new DateTime(2013, 11, 19), "Webs", "This is another test message"); mockServer.Raise(m => m.MessageSent += null, new ChatEventArgs(msg)); */ commLayer.Connect(Properties.Settings.Default.ServerIP, Properties.Settings.Default.ServerPort, Properties.Settings.Default.ServerPassword); GlobalStaticVars.StaticRole = new Core(commHandler); }
public void CommLayerTest_Live_Server() { // Create objects var commLayer = new CommLayer(); //This test succeeds if it logs in, any actual chat messages are only for //ad-hoc debugging. commLayer.Connect(Settings.Default.ServerIP, Settings.Default.ServerPort, Settings.Default.ServerPassword); }