Good work!
Imports InSimDotNet
Module InSimExample
Sub Main()
' Create InSim object
Dim insim As New InSim()
' Initialize InSim with specified settings
insim.Initialize(New InSimSettings() With {.Host = "127.0.0.1", .Port = 29999, .Admin = String.Empty})
' Send message to chat
insim.Send("/msg Hello, InSim!")
' Keep program open
Console.WriteLine("Press any key to exit...")
Console.ReadKey(True)
End Sub
End Module
#include "stdafx.h"
using namespace System;
using namespace InSimDotNet;
int main(array<String ^> ^args)
{
// Create InSim object
InSim ^insim = gcnew InSim();
// Initialize InSim
InSimSettings ^settings = gcnew InSimSettings();
settings->Host = L"127.0.0.1";
settings->Port = 29999;
settings->Admin = String::Empty;
insim->Initialize(settings);
// Send message to chat
insim->Send(L"/msg Hello, InSim!");
// Stop program from exiting...
Console::WriteLine(L"Press any key to exit...");
Console::ReadKey(true);
return 0;
}
import clr
clr.AddReference('System')
clr.AddReference('InSimDotNet')
from System import *
from InSimDotNet import *
# Create InSim object
insim = InSim()
# Initialize InSim
settings = InSimSettings()
settings.Host = '127.0.0.1'
settings.Port = 29999
settings.Admin = String.Empty
insim.Initialize(settings)
# Send message to chat
insim.Send('/msg Hello, InSim!')
# Stop program from exiting
Console.WriteLine('Press any key to exit...')
Console.ReadKey(True)
using System;
using InSimDotNet;
class Program {
static void Main() {
// Create InSim object
InSim insim = new InSim();
// Initialize InSim
insim.Initialize(new InSimSettings {
Host = "127.0.0.1",
Port = 29999,
Admin = String.Empty,
});
// Send message to chat
insim.Send("/msg Hello, InSim!");
// Stop program from exiting
Console.WriteLine("Press any key to exit...");
Console.ReadKey(true);
}
}
Apr 22 21:39:41 InSim - TCP : [LsC]
Apr 22 21:39:41 InSim guest closed : [LsC]
¦¨¦×ÂÆùÇÆÍß¡¶