성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] VT sequences to "CONOUT$" vs. STD_O...
[정성태] NetCoreDbg is a managed code debugg...
[정성태] Evaluating tail call elimination in...
[정성태] What’s new in System.Text.Json in ....
[정성태] What's new in .NET 9: Cryptography ...
[정성태] 아... 제시해 주신 "https://akrzemi1.wordp...
[정성태] 다시 질문을 정리할 필요가 있을 것 같습니다. 제가 본문에...
[이승준] 완전히 잘못 짚었습니다. 댓글 지우고 싶네요. 검색을 해보...
[정성태] 우선 답글 감사합니다. ^^ 그런데, 사실 저 예제는 (g...
[이승준] 수정이 안되어서... byteArray는 BYTE* 타입입니다...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
제니퍼 .NET
닷넷
COM 개체 관련
스크립트
VC++
VS.NET IDE
Windows
Team Foundation Server
디버깅 기술
오류 유형
개발 환경 구성
웹
기타
Linux
Java
DDK
Math
Phone
Graphics
사물인터넷
부모글 보이기/감추기
내용
<div style='display: inline'> <h1 style='font-family: Malgun Gothic, Consolas; font-size: 20pt; color: #006699; text-align: center; font-weight: bold'>libuv 모듈 살펴 보기</h1> <p> ASP.NET Core 프로젝트는 기반 프레임워크에 따라 2가지로 나뉩니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > "ASP.NET Core Web Application (.NET Core)"와 "ASP.NET Core Web Application (.NET Framework)" 차이점 ; <a target='tab' href='http://www.sysnet.pe.kr/2/0/11121'>http://www.sysnet.pe.kr/2/0/11121</a> </pre> <br /> 재미있는 것은, .NET Framework을 기반으로 한 ASP.NET Core 프로젝트의 경우 반드시 Platform 설정을 x86 또는 x64로 명시해야 한다는 점입니다. 그 이유는 배포(또는 빌드) 디렉터리를 보면 알 수 있는데요. ".NET Core"용 ASP.NET Core 프로젝트의 경우 다음과 같은 정도의 파일만 있는 반면,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > appsettings.Development.json appsettings.json web.config WebApplication1.deps.json WebApplication1.dll WebApplication1.pdb WebApplication1.PrecompiledViews.dll WebApplication1.PrecompiledViews.pdb WebApplication1.runtimeconfig.json </pre> <br /> ".NET Framework"용 ASP.NET Core 프로젝트를 배포(또는 빌드)하면 곧바로 실행 가능한 유형의 EXE로 구성되기 때문에 모든 의존성 있는 모듈을 포함하게 됩니다.<br /> <br /> <pre style='height: 400px; margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > appsettings.Development.json appsettings.json <span style='color: blue; font-weight: bold'>libuv.dll</span> Microsoft.AspNetCore.Antiforgery.dll Microsoft.AspNetCore.Authentication.Abstractions.dll Microsoft.AspNetCore.Authentication.Core.dll Microsoft.AspNetCore.Authorization.dll Microsoft.AspNetCore.Authorization.Policy.dll Microsoft.AspNetCore.Cors.dll Microsoft.AspNetCore.Cryptography.Internal.dll Microsoft.AspNetCore.DataProtection.Abstractions.dll Microsoft.AspNetCore.DataProtection.dll Microsoft.AspNetCore.Diagnostics.Abstractions.dll Microsoft.AspNetCore.Diagnostics.dll Microsoft.AspNetCore.dll Microsoft.AspNetCore.Hosting.Abstractions.dll Microsoft.AspNetCore.Hosting.dll Microsoft.AspNetCore.Hosting.Server.Abstractions.dll Microsoft.AspNetCore.Html.Abstractions.dll Microsoft.AspNetCore.Http.Abstractions.dll Microsoft.AspNetCore.Http.dll Microsoft.AspNetCore.Http.Extensions.dll Microsoft.AspNetCore.Http.Features.dll Microsoft.AspNetCore.HttpOverrides.dll Microsoft.AspNetCore.JsonPatch.dll Microsoft.AspNetCore.Localization.dll Microsoft.AspNetCore.Mvc.Abstractions.dll Microsoft.AspNetCore.Mvc.ApiExplorer.dll Microsoft.AspNetCore.Mvc.Core.dll Microsoft.AspNetCore.Mvc.Cors.dll Microsoft.AspNetCore.Mvc.DataAnnotations.dll Microsoft.AspNetCore.Mvc.dll Microsoft.AspNetCore.Mvc.Formatters.Json.dll Microsoft.AspNetCore.Mvc.Localization.dll Microsoft.AspNetCore.Mvc.Razor.dll Microsoft.AspNetCore.Mvc.Razor.Extensions.dll Microsoft.AspNetCore.Mvc.RazorPages.dll Microsoft.AspNetCore.Mvc.TagHelpers.dll Microsoft.AspNetCore.Mvc.ViewFeatures.dll Microsoft.AspNetCore.Razor.dll Microsoft.AspNetCore.Razor.Language.dll Microsoft.AspNetCore.Razor.Runtime.dll Microsoft.AspNetCore.ResponseCaching.Abstractions.dll Microsoft.AspNetCore.Routing.Abstractions.dll Microsoft.AspNetCore.Routing.dll Microsoft.AspNetCore.Server.IISIntegration.dll Microsoft.AspNetCore.Server.Kestrel.Core.dll Microsoft.AspNetCore.Server.Kestrel.dll Microsoft.AspNetCore.Server.Kestrel.Https.dll Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.dll Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.dll Microsoft.AspNetCore.WebUtilities.dll Microsoft.CodeAnalysis.CSharp.dll Microsoft.CodeAnalysis.dll Microsoft.CodeAnalysis.Razor.dll Microsoft.DotNet.PlatformAbstractions.dll Microsoft.Extensions.Caching.Abstractions.dll Microsoft.Extensions.Caching.Memory.dll Microsoft.Extensions.Configuration.Abstractions.dll Microsoft.Extensions.Configuration.Binder.dll Microsoft.Extensions.Configuration.CommandLine.dll Microsoft.Extensions.Configuration.dll Microsoft.Extensions.Configuration.EnvironmentVariables.dll Microsoft.Extensions.Configuration.FileExtensions.dll Microsoft.Extensions.Configuration.Json.dll Microsoft.Extensions.Configuration.UserSecrets.dll Microsoft.Extensions.DependencyInjection.Abstractions.dll Microsoft.Extensions.DependencyInjection.dll Microsoft.Extensions.DependencyModel.dll Microsoft.Extensions.FileProviders.Abstractions.dll Microsoft.Extensions.FileProviders.Composite.dll Microsoft.Extensions.FileProviders.Physical.dll Microsoft.Extensions.FileSystemGlobbing.dll Microsoft.Extensions.Hosting.Abstractions.dll Microsoft.Extensions.Localization.Abstractions.dll Microsoft.Extensions.Localization.dll Microsoft.Extensions.Logging.Abstractions.dll Microsoft.Extensions.Logging.Configuration.dll Microsoft.Extensions.Logging.Console.dll Microsoft.Extensions.Logging.Debug.dll Microsoft.Extensions.Logging.dll Microsoft.Extensions.ObjectPool.dll Microsoft.Extensions.Options.ConfigurationExtensions.dll Microsoft.Extensions.Options.dll Microsoft.Extensions.Primitives.dll Microsoft.Extensions.WebEncoders.dll Microsoft.Net.Http.Headers.dll Microsoft.Win32.Primitives.dll Microsoft.Win32.Registry.dll netstandard.dll Newtonsoft.Json.Bson.dll Newtonsoft.Json.dll [refs] System.AppContext.dll System.Buffers.dll System.Collections.Concurrent.dll System.Collections.dll System.Collections.Immutable.dll System.Collections.NonGeneric.dll System.Collections.Specialized.dll System.ComponentModel.Annotations.dll System.ComponentModel.dll System.ComponentModel.EventBasedAsync.dll System.ComponentModel.Primitives.dll System.ComponentModel.TypeConverter.dll System.Console.dll System.Data.Common.dll System.Diagnostics.Contracts.dll System.Diagnostics.Debug.dll System.Diagnostics.DiagnosticSource.dll System.Diagnostics.FileVersionInfo.dll System.Diagnostics.Process.dll System.Diagnostics.StackTrace.dll System.Diagnostics.TextWriterTraceListener.dll System.Diagnostics.Tools.dll System.Diagnostics.TraceSource.dll System.Diagnostics.Tracing.dll System.Drawing.Primitives.dll System.Dynamic.Runtime.dll System.Globalization.Calendars.dll System.Globalization.dll System.Globalization.Extensions.dll System.IO.Compression.dll System.IO.Compression.ZipFile.dll System.IO.dll System.IO.FileSystem.dll System.IO.FileSystem.DriveInfo.dll System.IO.FileSystem.Primitives.dll System.IO.FileSystem.Watcher.dll System.IO.IsolatedStorage.dll System.IO.MemoryMappedFiles.dll System.IO.Pipes.dll System.IO.UnmanagedMemoryStream.dll System.Linq.dll System.Linq.Expressions.dll System.Linq.Parallel.dll System.Linq.Queryable.dll System.Net.Http.dll System.Net.NameResolution.dll System.Net.NetworkInformation.dll System.Net.Ping.dll System.Net.Primitives.dll System.Net.Requests.dll System.Net.Security.dll System.Net.Sockets.dll System.Net.WebHeaderCollection.dll System.Net.WebSockets.Client.dll System.Net.WebSockets.dll System.Numerics.Vectors.dll System.ObjectModel.dll System.Reflection.dll System.Reflection.Extensions.dll System.Reflection.Metadata.dll System.Reflection.Primitives.dll System.Resources.Reader.dll System.Resources.ResourceManager.dll System.Resources.Writer.dll System.Runtime.CompilerServices.Unsafe.dll System.Runtime.CompilerServices.VisualC.dll System.Runtime.dll System.Runtime.Extensions.dll System.Runtime.Handles.dll System.Runtime.InteropServices.dll System.Runtime.InteropServices.RuntimeInformation.dll System.Runtime.Numerics.dll System.Runtime.Serialization.Formatters.dll System.Runtime.Serialization.Json.dll System.Runtime.Serialization.Primitives.dll System.Runtime.Serialization.Xml.dll System.Security.AccessControl.dll System.Security.Claims.dll System.Security.Cryptography.Algorithms.dll System.Security.Cryptography.Csp.dll System.Security.Cryptography.Encoding.dll System.Security.Cryptography.Primitives.dll System.Security.Cryptography.X509Certificates.dll System.Security.Cryptography.Xml.dll System.Security.Principal.dll System.Security.Principal.Windows.dll System.Security.SecureString.dll System.Text.Encoding.CodePages.dll System.Text.Encoding.dll System.Text.Encoding.Extensions.dll System.Text.Encodings.Web.dll System.Text.RegularExpressions.dll System.Threading.dll System.Threading.Overlapped.dll System.Threading.Tasks.dll System.Threading.Tasks.Extensions.dll System.Threading.Tasks.Parallel.dll System.Threading.Thread.dll System.Threading.ThreadPool.dll System.Threading.Timer.dll System.ValueTuple.dll System.Xml.ReaderWriter.dll System.Xml.XDocument.dll System.Xml.XmlDocument.dll System.Xml.XmlSerializer.dll System.Xml.XPath.dll System.Xml.XPath.XDocument.dll web.config WebApplication2.deps.json WebApplication2.exe WebApplication2.exe.config WebApplication2.pdb </pre> <br /> 이중에서 문제가 되는 것은 네이티브 모듈인 libuv.dll입니다. 이에 대해서는 전에도 한 번 언급했습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > .NET Core 오류 - 0x80131620 Unable to load DLL 'libuv' ; <a target='tab' href='http://www.sysnet.pe.kr/2/0/11389'>http://www.sysnet.pe.kr/2/0/11389</a> </pre> <br /> libuv 모듈은 꽤나 유명한 비동기 I/O 라이브러리인데, node.js에서도 사용하기 때문에 낯익은 분도 있을 것입니다. Visual C++와 vcpkg를 이용하면 직접 빌드해 보는 것도 가능한데요.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 오픈 소스 라이브러리를 쉽게 빌드해 주는 "C++ Package Manager for Windows: vcpkg" ; <a target='tab' href='http://www.sysnet.pe.kr/2/0/11409'>http://www.sysnet.pe.kr/2/0/11409</a> </pre> <br /> 이렇게 쉽습니다. ^^<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > E:\git_clone\vcpkg> <span style='color: blue; font-weight: bold'>vcpkg install libuv:x64-windows</span> The following packages will be built and installed: libuv[core]:x64-windows Starting package 1/1: libuv:x64-windows Building package libuv:x64-windows... -- CURRENT_INSTALLED_DIR=E:/git_clone/vcpkg/installed/x64-windows -- DOWNLOADS=E:/git_clone/vcpkg/downloads -- CURRENT_PACKAGES_DIR=E:/git_clone/vcpkg/packages/libuv_x64-windows -- CURRENT_BUILDTREES_DIR=E:/git_clone/vcpkg/buildtrees/libuv -- CURRENT_PORT_DIR=E:/git_clone/vcpkg/ports/libuv/. -- Downloading https://github.com/libuv/libuv/archive/v1.18.0.tar.gz... -- Downloading https://github.com/libuv/libuv/archive/v1.18.0.tar.gz... OK -- Testing integrity of downloaded file... -- Testing integrity of downloaded file... OK -- Extracting source E:/git_clone/vcpkg/downloads/libuv-libuv-v1.18.0.tar.gz -- Extracting done -- Configuring x64-windows-rel -- Configuring x64-windows-rel done -- Configuring x64-windows-dbg -- Configuring x64-windows-dbg done -- Build x64-windows-rel -- Build x64-windows-rel done -- Build x64-windows-dbg -- Build x64-windows-dbg done -- Performing post-build validation -- Performing post-build validation done Building package libuv:x64-windows... done Installing package libuv:x64-windows... Installing package libuv:x64-windows... done Elapsed time for package libuv:x64-windows: 18.16 s Total elapsed time: 18.16 s </pre> <br /> 실제로 이렇게 빌드한 것을 ASP.NET Core 프로젝트가 배포된 폴더의 libuv.dll을 덮어쓰면 pdb 파일과 소스 코드 파일이 연동되기 때문에 mixed mode 디버깅 환경으로 설정하면,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > ASP.NET Core 프로젝트의 "Enable unmanaged code debugging" 옵션 켜는 방법 ; <a target='tab' href='http://www.sysnet.pe.kr/2/0/11442'>http://www.sysnet.pe.kr/2/0/11442</a> </pre> <br /> 이런 식의 디버깅도 가능합니다.<br /> <br /> <img onclick='toggle_img(this)' class='imgView' alt='libuv_core_1.png' src='/SysWebRes/bbs/libuv_core_1.png' /><br /> <br /> <hr style='width: 50%' /><br /> <br /> 원한다면, vcpkg로 빌드된 libuv.dll을 이용해 C++ 환경에서 async I/O 서버를 만들 수도 있습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > An Introduction to libuv Programing/Node.js 2014.04.01 14:09 ; <a target='tab' href='http://namocom.tistory.com/319?category=439241'>http://namocom.tistory.com/319?category=439241</a> An Introduction to libuv ; <a target='tab' href='http://nikhilm.github.io/uvbook/'>http://nikhilm.github.io/uvbook/</a> </pre> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > // ConsoleApplication1.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <uv.h> int main() { uv_loop_t loop; uv_loop_init(&loop); printf("..."); uv_run(&loop, UV_RUN_DEFAULT); uv_loop_close(&loop); return 0; } </pre> <br /> 하지만 저도 이번엔 여기까지만! ^^ (물론 찾아보면 <a target='tab' href='https://github.com/txdv/LibuvSharp'>C# 래퍼</a>도 있습니다.)<br /> <br /> 참고로, depends.exe로 살펴보면 다음과 같은 API들이 있는 걸 확인할 수 있습니다.<br /> <br /> <pre style='height: 400px; margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > uv_accept uv_async_init uv_async_send uv_backend_fd uv_backend_timeout uv_barrier_destroy uv_barrier_init uv_barrier_wait uv_buf_init uv_cancel uv_chdir uv_check_init uv_check_start uv_check_stop uv_close uv_cond_broadcast uv_cond_destroy uv_cond_init uv_cond_signal uv_cond_timedwait uv_cond_wait uv_cpu_info uv_cwd uv_default_loop uv_disable_stdio_inheritance uv_dlclose uv_dlerror uv_dlopen uv_dlsym uv_err_name uv_exepath uv_fileno uv_free_cpu_info uv_free_interface_addresses uv_freeaddrinfo uv_fs_access uv_fs_chmod uv_fs_chown uv_fs_close uv_fs_event_getpath uv_fs_event_init uv_fs_event_start uv_fs_event_stop uv_fs_fchmod uv_fs_fchown uv_fs_fdatasync uv_fs_fstat uv_fs_fsync uv_fs_ftruncate uv_fs_futime uv_fs_link uv_fs_lstat uv_fs_mkdir uv_fs_mkdtemp uv_fs_open uv_fs_poll_getpath uv_fs_poll_init uv_fs_poll_start uv_fs_poll_stop uv_fs_read uv_fs_readlink uv_fs_realpath uv_fs_rename uv_fs_req_cleanup uv_fs_rmdir uv_fs_scandir uv_fs_scandir_next uv_fs_sendfile uv_fs_stat uv_fs_symlink uv_fs_unlink uv_fs_utime uv_fs_write uv_get_free_memory uv_get_process_title uv_get_total_memory uv_getaddrinfo uv_getnameinfo uv_getrusage uv_guess_handle uv_handle_size uv_has_ref uv_hrtime uv_idle_init uv_idle_start uv_idle_stop uv_inet_ntop uv_inet_pton uv_interface_addresses uv_ip4_addr uv_ip4_name uv_ip6_addr uv_ip6_name uv_is_active uv_is_closing uv_is_readable uv_is_writable uv_key_create uv_key_delete uv_key_get uv_key_set uv_kill uv_listen uv_loadavg uv_loop_alive uv_loop_close uv_loop_configure uv_loop_delete uv_loop_init uv_loop_new uv_loop_size uv_mutex_destroy uv_mutex_init uv_mutex_lock uv_mutex_trylock uv_mutex_unlock uv_now uv_once uv_os_free_passwd uv_os_get_passwd uv_os_homedir uv_os_tmpdir uv_pipe_bind uv_pipe_connect uv_pipe_getpeername uv_pipe_getsockname uv_pipe_init uv_pipe_open uv_pipe_pending_count uv_pipe_pending_instances uv_pipe_pending_type uv_poll_init uv_poll_init_socket uv_poll_start uv_poll_stop uv_prepare_init uv_prepare_start uv_prepare_stop uv_print_active_handles uv_print_all_handles uv_process_kill uv_queue_work uv_read_start uv_read_stop uv_recv_buffer_size uv_ref uv_replace_allocator uv_req_size uv_resident_set_memory uv_run uv_rwlock_destroy uv_rwlock_init uv_rwlock_rdlock uv_rwlock_rdunlock uv_rwlock_tryrdlock uv_rwlock_trywrlock uv_rwlock_wrlock uv_rwlock_wrunlock uv_sem_destroy uv_sem_init uv_sem_post uv_sem_trywait uv_sem_wait uv_send_buffer_size uv_set_process_title uv_setup_args uv_shutdown uv_signal_init uv_signal_start uv_signal_stop uv_spawn uv_stop uv_stream_set_blocking uv_strerror uv_tcp_bind uv_tcp_connect uv_tcp_getpeername uv_tcp_getsockname uv_tcp_init uv_tcp_init_ex uv_tcp_keepalive uv_tcp_nodelay uv_tcp_open uv_tcp_simultaneous_accepts uv_thread_create uv_thread_equal uv_thread_join uv_thread_self uv_timer_again uv_timer_get_repeat uv_timer_init uv_timer_set_repeat uv_timer_start uv_timer_stop uv_translate_sys_error uv_try_write uv_tty_get_winsize uv_tty_init uv_tty_reset_mode uv_tty_set_mode uv_udp_bind uv_udp_getsockname uv_udp_init uv_udp_init_ex uv_udp_open uv_udp_recv_start uv_udp_recv_stop uv_udp_send uv_udp_set_broadcast uv_udp_set_membership uv_udp_set_multicast_interface uv_udp_set_multicast_loop uv_udp_set_multicast_ttl uv_udp_set_ttl uv_udp_try_send uv_unref uv_update_time uv_uptime uv_version uv_version_string uv_walk uv_write uv_write2 </pre> </p><br /> <br /><hr /><span style='color: Maroon'>[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </div>
첨부파일
스팸 방지용 인증 번호
7223
(왼쪽의 숫자를 입력해야 합니다.)