Skip to content
Snippets Groups Projects
Commit 70c1e6bf authored by joalhelk's avatar joalhelk
Browse files

update on pop

parent 8cd76518
No related branches found
No related tags found
No related merge requests found
Showing
with 177 additions and 0 deletions
File added
File added

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31205.134
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "POP3Client", "POP3Client\POP3Client.csproj", "{EBFBFC4C-064C-4547-9CD0-39816C397571}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{EBFBFC4C-064C-4547-9CD0-39816C397571}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EBFBFC4C-064C-4547-9CD0-39816C397571}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EBFBFC4C-064C-4547-9CD0-39816C397571}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EBFBFC4C-064C-4547-9CD0-39816C397571}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3DA04815-9C58-42C3-82EE-79B75513A727}
EndGlobalSection
EndGlobal
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
</Project>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net.Sockets;
using System.IO;
namespace POP3Client
{
class Program
{
static void Main(string[] args)
{
Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
try
{
socket.Connect("localhost", 110);
}
catch (Exception ex)
{
Console.Write("Virhe: " + ex.Message);
Console.ReadKey();
return;
}
NetworkStream ns = new NetworkStream(socket);
StreamReader sr = new StreamReader(ns);
StreamWriter sw = new StreamWriter(ns);
Boolean on = true;
String viesti = "";
while (on)
{
// Luetaan
viesti = sr.ReadLine();
Console.WriteLine(viesti);
String[] status = viesti.Split(' ');
switch(status[0])
{
case "+OK":
break;
default:
break;
}
}
Console.ReadKey();
sw.Close();
sr.Close();
ns.Close();
socket.Close();
}
}
}
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v3.1",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v3.1": {
"POP3Client/1.0.0": {
"runtime": {
"POP3Client.dll": {}
}
}
}
},
"libraries": {
"POP3Client/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}
\ No newline at end of file
File added
File added
File added
{
"runtimeOptions": {
"additionalProbingPaths": [
"C:\\Users\\Joppe\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\Joppe\\.nuget\\packages"
]
}
}
\ No newline at end of file
{
"runtimeOptions": {
"tfm": "netcoreapp3.1",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "3.1.0"
}
}
}
\ No newline at end of file
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = "")]
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("POP3Client")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("POP3Client")]
[assembly: System.Reflection.AssemblyTitleAttribute("POP3Client")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Generated by the MSBuild WriteCodeFragment class.
916f2515fefd86ae0f3f5620f187e691ec1e1c60
File added
ba938b7afaf50dc7b9bf1e93516b7840bc9053d1
E:\Kurssit\ties323\POP3Client\POP3Client\bin\Debug\netcoreapp3.1\POP3Client.exe
E:\Kurssit\ties323\POP3Client\POP3Client\bin\Debug\netcoreapp3.1\POP3Client.deps.json
E:\Kurssit\ties323\POP3Client\POP3Client\bin\Debug\netcoreapp3.1\POP3Client.runtimeconfig.json
E:\Kurssit\ties323\POP3Client\POP3Client\bin\Debug\netcoreapp3.1\POP3Client.runtimeconfig.dev.json
E:\Kurssit\ties323\POP3Client\POP3Client\bin\Debug\netcoreapp3.1\POP3Client.dll
E:\Kurssit\ties323\POP3Client\POP3Client\bin\Debug\netcoreapp3.1\POP3Client.pdb
E:\Kurssit\ties323\POP3Client\POP3Client\obj\Debug\netcoreapp3.1\POP3Client.csprojAssemblyReference.cache
E:\Kurssit\ties323\POP3Client\POP3Client\obj\Debug\netcoreapp3.1\POP3Client.AssemblyInfoInputs.cache
E:\Kurssit\ties323\POP3Client\POP3Client\obj\Debug\netcoreapp3.1\POP3Client.AssemblyInfo.cs
E:\Kurssit\ties323\POP3Client\POP3Client\obj\Debug\netcoreapp3.1\POP3Client.csproj.CoreCompileInputs.cache
E:\Kurssit\ties323\POP3Client\POP3Client\obj\Debug\netcoreapp3.1\POP3Client.dll
E:\Kurssit\ties323\POP3Client\POP3Client\obj\Debug\netcoreapp3.1\POP3Client.pdb
E:\Kurssit\ties323\POP3Client\POP3Client\obj\Debug\netcoreapp3.1\POP3Client.genruntimeconfig.cache
File added
File added
f05d1b480575433b5d159befbb569099130e543f
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment