{"id":619,"date":"2015-07-29T16:36:20","date_gmt":"2015-07-29T07:36:20","guid":{"rendered":"http:\/\/cromi.com\/?p=619"},"modified":"2015-07-29T16:36:20","modified_gmt":"2015-07-29T07:36:20","slug":"c-zebra-tcp-%ed%94%84%eb%a6%b0%ed%8a%b8-code","status":"publish","type":"post","link":"http:\/\/cromi.com\/?p=619","title":{"rendered":"C# Zebra TCP \ud504\ub9b0\ud2b8 Code"},"content":{"rendered":"<p>\uc2dc\ub9ac\uc5bc\ub85c \ubf51\ub294\uac70\uc57c  \uc804\ubd80\ub2e4 \uc544\uc2e4\uaebc\uacf5<\/p>\n<p>TCP \ub85c \ud558\ub294\ubc95\uc740.. \uc774\uc81c \uadf8 \uae30\ubc18\uc774 \ub418\uc5b4\uac00\ub2c8\uae50 ZT410\uc744 \uc4f0\uae30 \uc704\ud558\uc5ec..!!<\/p>\n<pre lang=\"csharp\">\r\nusing System.Net;\r\n\r\n\r\nprivate void btn_TCPIPPrint(string ZPLString)\r\n{\r\n\tstring ipAddress = \"192.168.20.238\";   \/\/ Test ZT410 ip\r\n\tint port = 9100;\t\t\r\n\r\n\ttry\r\n\t{\r\n\t\t\/\/ Open connection\r\n\t\tSystem.Net.Sockets.TcpClient ZT410 = new System.Net.Sockets.TcpClient();\r\n\t\tZT410.Connect(ipAddress, port);\r\n\r\n\t\t\/\/ Write ZPL String to connection\r\n\t\tSystem.IO.StreamWriter ZebraPrint = new System.IO.StreamWriter(ZT410.GetStream());\r\n\r\n\t\tZebraPrint.Write(ZPLString);\r\n\t\t\/\/writer.WriteLine(ZPLString);\r\n\r\n\t\tZebraPrint.Flush();\r\n\r\n\t\t\/\/ Close Connection\r\n\r\n\t\tZebraPrint.Close();\r\n\t\tZT410.Close();\r\n\r\n\t}\r\n\r\n\tcatch (Exception ex)\r\n\t{\r\n\r\n\t\t\/\/ Catch Exception\r\n\t\tMessageBox.Show(ex.ToString());\r\n\t}\t\t\r\n}\r\n\r\n\r\n<\/pre>\n<p>\ucc38 \uc27d\uc9c0\uc6a9&#8230;<\/p>\n<p>\ubb3c\ub860 \uae30\uc5b5\uc744 \ub2e4 \ubabb\ud558\ub2c8 \uba54\ubaa8\uc6a9&#8230;<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>\uc2dc\ub9ac\uc5bc\ub85c \ubf51\ub294\uac70\uc57c \uc804\ubd80\ub2e4 \uc544\uc2e4\uaebc\uacf5 TCP \ub85c \ud558\ub294\ubc95\uc740.. \uc774\uc81c \uadf8 \uae30\ubc18\uc774 \ub418\uc5b4\uac00\ub2c8\uae50 ZT410\uc744 \uc4f0\uae30 \uc704\ud558\uc5ec..!! using System.Net; private void btn_TCPIPPrint(string ZPLString) { string ipAddress = &#8220;192.168.20.238&#8221;; \/\/ Test ZT410 ip int port = 9100; try { \/\/ Open connection System.Net.Sockets.TcpClient ZT410 = new System.Net.Sockets.TcpClient(); ZT410.Connect(ipAddress, port); \/\/ Write ZPL String to connection System.IO.StreamWriter ZebraPrint = new [&hellip;]<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[16,54,246,248,240,53,244,247,249,245],"class_list":["post-619","post","type-post","status-publish","format-standard","hentry","category-vs2008","tag-c","tag-c-2008","tag-c-zebra","tag-c-zebra-tcpip","tag-c2008","tag-vs2008-2","tag-zebra","tag-zebra-tcpip","tag-zebra-zt410","tag-zt410"],"_links":{"self":[{"href":"http:\/\/cromi.com\/index.php?rest_route=\/wp\/v2\/posts\/619","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/cromi.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/cromi.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/cromi.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/cromi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=619"}],"version-history":[{"count":3,"href":"http:\/\/cromi.com\/index.php?rest_route=\/wp\/v2\/posts\/619\/revisions"}],"predecessor-version":[{"id":622,"href":"http:\/\/cromi.com\/index.php?rest_route=\/wp\/v2\/posts\/619\/revisions\/622"}],"wp:attachment":[{"href":"http:\/\/cromi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/cromi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=619"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/cromi.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}