I have a sample telnet server. on port 23 that I use to view log files and small things like that. What I don't know is how to check the current connection terminal emulation when I connect to it. I use MT32 Telnet to connect to it. I just need to detect the terminal emulation on the server. any one have any ideas or thoughts on this. Thanks
bigjoe11a
Posts
-
how to detact terminal emulation -
Getting a console server to do more then connectLOL. Right. If I new how to do that I wouldn't have posted a message asking for help.
-
Getting a console server to do more then connectOk, so would you need my client source code to show me how to do that or what do you need.
-
Getting a console server to do more then connectWhat I want to do. Is log in and have a menu with choices. The only thing I could do with this server is connect and thats it. I wanted en option that when I connected to the server. I could log in and it would take me to a menu. Then I could do some thing or log off. Sorry I been up late nights so my typing may not be all that great. Joe
-
Getting a console server to do more then connectWhat II have is a small server that I been playing a round with. It's just that I can connect to it and that's about it. I been trying to do is get it so I can log and go to a menu and well doesn't look like I can get my answer from some of the other places. So I thought I would try here. Can some one please help me set this up. the code is below.
static void Main(string[] args) { int recv; byte[] data = new byte[1024]; IPEndPoint ipep = new IPEndPoint(IPAddress.Any, 1605); Socket newsock = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); newsock.Bind(ipep); newsock.Listen(10); Console.WriteLine("Waiting for a client..."); Socket client = newsock.Accept(); IPEndPoint clientep = (IPEndPoint)client.RemoteEndPoint; Console.WriteLine("Connected with {0} at port {1}", clientep.Address, clientep.Port); string welcome = "Welcome to my TCP server (© 2008)"; data = Encoding.ASCII.GetBytes(welcome); client.Send(data, data.Length, SocketFlags.None); do { string menu = "L)ogin Q)uit V)iew Log"; data = Encoding.ASCII.GetBytes(menu); client.Send(data, data.Length, SocketFlags.None); string choice = "Command : "; data = Encoding.ASCII.GetBytes(choice); client.Send(data, data.Length, SocketFlags.None); switch (choice.ToUpper()) { case "Q": break; case "L": Login(); break; case "V": break; default: string NotThere = "Wrong Choice"; data = Encoding.ASCII.GetBytes(NotThere); client.Send(data, data.Length, SocketFlags.None); break; } } while (choice != "Q"); while (true) { data = new byte[1024]; recv = client.Receive(data); if (recv == 0) break; Console.WriteLine(Encoding.ASCII.GetString(data, 0, recv)); client.Send(data, recv, SocketFlags.None); } Con
-
Initialize a protocol in a BBSI just completed a file section on a BBS I just setup and I wanted to add an option to download files from it. From what I have read I need to find out how to Initialize a protocol in a BBS. I'm trying to use FDSZ and GSZ and I get the same problem, 'No port Detected' Both programs require a Fossel. x00 or bnu I have tried to use. After researching this for the last 30 days. I find a lot if note on the protocols them self's. Just nothing related to Initializing the bbs Does any one now how to do this.
-
File Tansfer Protocols in VC#I have a telnet server that runs scripts. I have a command called files_download "path\filename.zip" All this does is send a file from the telnet server to the terminal program. I'm trying to use fdsz and gsz File Transfer protocols to send these files. When I run it. The fdsz or gsz starts. I keep getting port not detected. Well I even tried fdsz port 23 sz %1 and I still get the same error Can some one tell me what I'm doing wrong and how to fix this. Thanks Joe
-
Command ScriptsDoes any one know of a Development tool that can create Command Shells or loadable modules in windows for C# for a server.
-
SQL Server 2008 in C# Console AppicationsWell I wanted to tell you too. That when I added the new record. It added it. But is didn't save it to the database. When I added the record. And I when to view all the records. The 3rd and new record was there. How ever when I closed the application and look in the database explorer. to view the records. The 3rd record was missing. Looks like it never got added to the database file. And all so I have been doing searches for all this at google and I go throw 100's of pages and still can't find what I'm looking for. Thats why I desided to post.
-
SQL Server 2008 in C# Console AppicationsThanks. That's works now. It turned out to be the table name was wrong. That's why. It Shows as UserData and it should be UaersData. What I did was I went back and check my lines again making sure they were all spelled right and so. I changed so many times. I forgot to change it back. I can't under stand why it didn't throw an error. Ok, now. Now how about a search. How can I setup a search. Using the same code or is that not the same. string sname = "Tom Cat"; So how would I search for this name and if it finds it, it displays the record. If not it throws an error.
-
SQL Server 2008 in C# Console AppicationsWell this is what why code likes like now. I'm just going to add the rest of the code. I didn't think it would help. Here it is. Don't worry about the RMDoor. Its just an add on library that I added. //////////////////////////////////// public static void add() { RMDoor.ClrScr(); Person addr = new Person(); RMDoor.Write("Enter Name : "); addr.name = RMDoor.ReadLn(); RMDoor.Write("Address : "); addr.telnetaddr = RMDoor.ReadLn(); RMDoor.ClrScr(); RMDoor.WriteLn("BBS Name : " + addr.name); RMDoor.WriteLn("Telnet Address : " + addr.telnetaddr); RMDoor.WriteLn(); RMDoor.Write("Is this what you want Y/N"); string Q = RMDoor.ReadLn(); Q = Q.ToUpper(); savelog("User has just added an entry"); if (Q == "Y") { string UserConnection = Properties.Settings.Default.UsersConnectionString; SqlConnection MyConnection = new SqlConnection(UserConnection); String MyString = @"INSERT INTO UserData (Name, telnetaddr) VALUES('" + addr.name + "', '" + addr.telnetaddr + "')"; SqlCommand MyCmd = new SqlCommand(MyString, MyConnection); MyConnection.Open(); try { MyCmd.ExecuteNonQuery(); Int32 rowsAffected = MyCmd.ExecuteNonQuery(); RMDoor.WriteLn("RowsAffected: " + rowsAffected); MyConnection.Close(); } catch (SqlException ex) { RMDoor.WriteLn(ex.Message); } } else { RMDoor.WriteLn("Save Aborted"); } RMDoor.WriteLn("Press Enter to Continue"); RMDoor.WriteLn(); } I hope this helps. It just doesn't work.
-
SQL Server 2008 in C# Console Appicationswell I'm getting some errors on some of the lines. So I can't compile yet. I do know that some of of it is missing. My code is below string UserConnection = Properties.Settings.Default.UsersConnectionString; SqlConnection MyConnection = new SqlConnection(UserConnection); String MyString = @"INSERT INTO UserData (Name, telnetaddr) VALUES('" + addr.name.ToString().TRIM() + "', '" + addr.telnetaddr.ToString().Trim() + "')"; SqlCommand command = new SqlCommand(MyString, MyConnection); //command.Parameters.Add("@ID", SqlDbType.Int); //command.Parameters["@ID"].Value = ID; command.Parameters.Add("@Name", SqlDbType.Text); command.Parameters["@Name"].Value = addr.name; command.Parameters.Add("@telnetaddr", SqlDbType.Text); command.Parameters["@telnetaddr"].Value = addr.telnetaddr; // Use AddWithValue to assign Demographics. // SQL Server will implicitly convert strings into XML. command.Parameters.AddWithValue(commandText, ); try { MyConnection.Open(); Int32 rowsAffected = command.ExecuteNonQuery(); Console.WriteLine("RowsAffected: {0}", rowsAffected); } catch (Exception ex) { Console.WriteLine(ex.Message); } Error 1 Argument missing C:\Users\Joe\Documents\Visual Studio 2008\Projects\MyDoor\Program.cs 245 66 MyDoor Error 2 'string' does not contain a definition for 'TRIM' and no extension method 'TRIM' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?) C:\Users\Joe\Documents\Visual Studio 2008\Projects\MyDoor\Program.cs 233 114 MyDoor Error 3 The name 'commandText' does not exist in the current context C:\Users\Joe\Documents\Visual Studio 2008\Projects\MyDoor\Program.cs 245 53 MyDoor What I should have ask if some one could type out the full code So I know I get every thing right.
-
SQL Server 2008 in C# Console AppicationsI didn't see the extra commands at the top. This is an update. I need an insert
-
SQL Server 2008 in C# Console AppicationsWell I'm stuck. Is there a sample related to what I'm doing. This isn't going to work.
-
SQL Server 2008 in C# Console AppicationsThanks how ever I did try that too. and for some reason. It just not inserting. Its not giving me any errors.
-
SQL Server 2008 in C# Console AppicationsWhat I'm trying to do is insert a new record into a SQL Server 2008 database file. So far the samples I have fount don't work. Does any one know how to do this. Below is one of that samples I did fine. string UserConnection = Properties.Settings.Default.UsersConnectionString; SqlConnection MyConnection = new SqlConnection(UserConnection); MyConnection.Open(); String MyString = @"INSERT INTO UserData (Name, telnetaddr) VALUES('addr.name', 'addr.telnetaddr')"; SqlCommand MyCmd = new SqlCommand(MyString, MyConnection); MyCmd.ExecuteScalar(); MyConnection.Close(); RMDoor.WriteLn("New Entry Added"); } catch(SqlException e) { RMDoor.WriteLn(e.Message.ToString()); }
-
BBS Door Library in C#Does any one know if any one made a Library to create BBS doors in C# or VC# I'm looking for some thing that will work with VC# 2008 express. Thanks
-
C# Console ApplicationYes I did, Thanks again
-
C# Console ApplicationThank you very much. That works
-
C# Console ApplicationHi! OriginalGriff, Thank you very much. That was very easy for me to understand. It works. Thank You Can you tell me how to make the loop into a hot key. Where the user doesn't have to press enter. Just the number Thanks Joe