mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 23:31:13 -05:00
Intial Commit of Version 0.1
This commit is contained in:
33
Admin/Connection.cs
Normal file
33
Admin/Connection.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
|
||||
namespace IW4MAdmin
|
||||
{
|
||||
class Connection
|
||||
{
|
||||
public Connection(String Loc)
|
||||
{
|
||||
Location = Loc;
|
||||
ConnectionHandle = WebRequest.Create(Location);
|
||||
ConnectionHandle.Proxy = null;
|
||||
}
|
||||
|
||||
public String Read()
|
||||
{
|
||||
WebResponse Resp = ConnectionHandle.GetResponse();
|
||||
StreamReader data_in = new StreamReader(Resp.GetResponseStream());
|
||||
String result = data_in.ReadToEnd();
|
||||
|
||||
data_in.Close();
|
||||
Resp.Close();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private String Location;
|
||||
private WebRequest ConnectionHandle;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user