Hi. I have this connection code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Net.Sockets;
namespace ConnApp
{
class Program
{
static void Main(string[] args)
{
Socket sck = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
IPEndPoint ip = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 1234);
try
{
sck.Connect(ip);
Console.WriteLine("Connected!");
}
catch
{
Console.WriteLine("Error!");
}
Console.Read();
}
}
}
It's telling me "Error!" and I cannot connect to local. But connection works on port 80. Please help me.